【009】iOS获取当前时间戳

//获取系统时间戳
    NSDate* localDate = [NSDate date];
    NSTimeInterval interval=[localDate timeIntervalSince1970];
    NSString *timestamp = [NSString stringWithFormat:@"%d", (long)interval];
    NSLog(timestamp);

你可能感兴趣的:(ios,iPhone,Timestamp)