18 时间戳
2016-09-14 本文已影响0人
_Nevermore
//获取当前时间戳
- (NSString*)getCurrentTime {
NSDate datenow = [NSDate date];
NSTimeZonezone = [NSTimeZone timeZoneWithName:@"Asia/Beijing"];
NSInteger interval = [zone secondsFromGMTForDate:datenow];
NSDate *localeDate = [datenow dateByAddingTimeInterval:interval];
NSString *timeSpp = [NSString stringWithFormat:@"%f", [localeDate timeIntervalSince1970]];
return timeSpp;
}