-(NSString*)changeNumToTime:(NSString*)str {
NSDate *date = [NSDate dateWithTimeIntervalSince1970:[str integerValue] - 8*3600]; //有八小时时差,需要减去
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat: @"yyyy-MM-dd HH:mm:ss"];
NSString *showtime = [dateFormatter stringFromDate:date];
return showtime;
}
eg: str = @"1441047302"时,返回的showtime = @"1970-01-18 00:17:27"。