后臺數(shù)據(jù)返回的是這樣的帶T的時間戳:
時間戳:
2013-08-28T13:07:53+00:00
解析方法:
NSDateFormatter*dateFormat = [[NSDateFormatteralloc]init];
[dateFormatsetDateFormat:@"yyyy'-'MM'-'dd'T'HH':'mm':'ssZZZZ"];
NSDate*date = [dateFormatdateFromString:timeString];
NSString * timeStr = [dateFormatsetDateFormat:@"yyyy-MM-dd HH:mm:ss"];?