标签:ios nsdate
1.
- (NSDate*)localeDate:(NSDate*)date { NSTimeZone *zone = [NSTimeZone systemTimeZone]; NSInteger interval = [zone secondsFromGMTForDate: date]; NSDate *localeDate = [date dateByAddingTimeInterval: interval]; return localeDate; }
2.
[dateFormat setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"UTC"]];
本文出自 “羊仔” 博客,请务必保留此出处http://5934497.blog.51cto.com/5924497/1697234
标签:ios nsdate
原文地址:http://5934497.blog.51cto.com/5924497/1697234