IOS- 1970ms时间计算

//创建时间

            NSInteger numTime = [dict[@"createTime"][@"time"] longLongValue]/1000;

            NSDate *nowTime = [NSDate dateWithTimeIntervalSince1970:numTime];

            

            NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];

            [dateFormat setDateFormat:@"yyyy-MM-dd HH:mm:ss"];

            NSString *dateString = [dateFormat stringFromDate:nowTime];

            

            cd.createTime = dateString;

posted on 2015-11-27 12:49  wyw880101  阅读(124)  评论(0编辑  收藏  举报