时间戳
程序员文章站
2022-07-03 15:02:08
...
-(NSString *)getTime{
NSDate *datenow = [NSDate date];
// NSTimeZone *zone = [NSTimeZone systemTimeZone];
// NSInteger interval = [zone secondsFromGMTForDate:datenow];
// NSDate *localeDate = [datenow dateByAddingTimeInterval: interval];
NSString *timeSp = [NSString stringWithFormat:@"%ld", (long)[datenow timeIntervalSince1970]];
return timeSp;
}