Unix Timestamp 时间戳转换

用到的是NSDate的

- (NSTimeInterval)timeIntervalSince1970
NSString * timestamp = [NSString stringWithFormat:@"%f",[[NSDate date] timeIntervalSince1970] * 1000];

(times 1000 for milliseconds, otherwise, take that out)

你可能感兴趣的:(Unix Timestamp 时间戳转换)