我想将时区从 (-12:00) - (+12:00) 设置为 (-23:45) -(+23:45)
+ (NSArray *)timeZoneList {
NSMutable *list = [[NSMustableArry alloc]init];
for(int n = -(23 * 60+45); n<= 23*60+45; n+=15; {
NSString * timeZoneName = @"UTC ";
NSString *sign;
if (n==0) sign = @"+-";
else if(n<0) sign = @"-";
else sign = @"+";
timeZoneName = [timeZoneName stringByAppendinfFormat:@"%@ %.2d:%.2d",sign,abs(n/60),abs(n%60)];
NSTimeZone *timeZone = [NSTimeZone timeZoneForSecondsFromGMT:n*60];
[list addObject:[NSArray arryWithObjects:timeZoneName,timeZone,nil]];
}
return [list copy];
}
我在 (-18:15) - (+18:15) 上面发现了一个问题。
我能做些什么?请指教。