// 时间戳 转时间
int intTimeString = [_model.date intValue];
NSDate *confromTimesp = [NSDate dateWithTimeIntervalSince1970:intTimeString];
NSLog(@"confromTimesp %@", confromTimesp);
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
NSTimeZone * timeZone = [NSTimeZone timeZoneForSecondsFromGMT:8*3600];
[formatter setTimeZone:timeZone];
[formatter setDateStyle:NSDateFormatterMediumStyle];
[formatter setTimeStyle:NSDateFormatterShortStyle];
[formatter setDateFormat:@"YYYY-MM-dd HH:mm:ss"];
NSString * formatedTime = [formatter stringFromDate:confromTimesp];
NSLog(@"formatedTime is %@",formatedTime);
_SendTimeLabel.text = formatedTime;
时间: 2024-10-10 20:25:54