iOS 日期格式的转换
更改“2011-12-09T14:58:36+08:00”格式的日期
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setLocale:[[[NSLocale alloc]initWithLocaleIdentifier:@"en_US_POSIX"] autorelease]];
[dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZ"];
NSDate *dateTime = nil;
[dateFormatter getObjectValue:&dateTime forString:pubTime range:nil error:nil];
[dateFormatter setDateFormat:@"yyyy年MM月dd日 HH:mm:ss"];
[lblPubTime setText:[dateFormatter stringFromDate:dateTime]];
[lblPubTime setFrame:CGRectMake(10, startYLoc, 120, 15)];
[dateFormatter release];