需要设置Locale
NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease];
[dateFormatter setDateFormat:@"yyyyMMddHHmmss"];
NSDate *currentDate = [[[NSDate alloc] init] autorelease];
[dateFormatter setCalendar:[NSCalendar autoupdatingCurrentCalendar]];
[dateFormatter setLocale:[[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"] autorelease]];
NSString *strDate = [dateFormatter stringFromDate:currentDate];
http://stackoverflow.com/questions/7072267/why-does-my-nsdateformatter-sometimes-return-an-a-m-or-p-m-with-yyyymmddhhmmss