服务器返回的时间 展示成:
@"yyyy-MM-dd"
代码如下:
NSDateFormatter* formatter=[[NSDateFormatter alloc]init];
formatter.dateFormat=@"yyyy-MM-dd";
NSDate *date = [NSDate dateWithTimeIntervalSince1970:baseData.posttime.doubleValue];
NSString* birthString=[formatter stringFromDate:date];
self.timeLab.text = birthString;