标签: iphone xcode ios4
是否可以通过代码获取其他城市的当前时间?(例如巴黎当前时间)
答案 0 :(得分:2)
以下是如何获得它:
[NSTimeZone setDefaultTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"CEST"]]; NSLog(@"Paris time: %@", [[NSDate date] descriptionWithLocale:nil ]);
答案 1 :(得分:0)
请看NSTimeZone。