Behavior of NSDateFormatter in iOS 5.1 and iOS 6
问题 Anyone else noticing some differences between iOS 5.1 and iOS 6.0? In the following, the format of the date string comes back differently in each version:NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease]; dateFormatter.dateFormat = @"MM/dd/yyyy HH:mm:ss (vvvvv)"; NSDate *lDate = [[NSDate alloc]init]; NSString *sDate = [dateFormatter stringFromDate:lDate]; In iOS 5.1, sDate is "10/01/2012 16:43:09 (GMT-05:00)" but in iOS 6.0, sDate is "10/01/2012 16:44:09 ()" Any