嗨,我必须以NSTimeZoneNameStyleShortStandard
IST、MST 等形式显示时区,但我无法在下面得到这个是我的 code.o/p 是这样来的,GMT+05:30
而不是IST
.
NSTimeZone *systimeZone = [NSTimeZone systemTimeZone];
NSString *timeZoneString = [systimeZone localizedName:NSTimeZoneNameStyleShortStandard locale:[NSLocale currentLocale]];
if([systimeZone isDaylightSavingTimeForDate:[NSDate date]]){
timeZoneString = [systimeZone localizedName:NSTimeZoneNameStyleShortDaylightSaving locale:[NSLocale currentLocale]];
}
NSLog(@"%@",timeZoneString);
o/p 2013-04-27 04:41:01.679 DJProject[1460:c07] GMT+05:30