NSString*str=model.add_time;//時(shí)間戳
NSTimeIntervaltime=[strdoubleValue]+28800;//因?yàn)闀r(shí)差問(wèn)題要加8小時(shí)== 28800 sec
NSDate*detaildate=[NSDatedateWithTimeIntervalSince1970:time];
//實(shí)例化一個(gè)NSDateFormatter對(duì)象
NSDateFormatter*dateFormatter = [[NSDateFormatteralloc]init];
//設(shè)定時(shí)間格式,這里可以設(shè)置成自己需要的格式
[dateFormattersetDateFormat:@"yyyy-MM-dd"];
NSString *currentDateStr = [dateFormatter stringFromDate: detaildate];