NSDateFormatter not working on iOS 5.
NSDateFormatter not working on iOS 5.
- Subject: NSDateFormatter not working on iOS 5.
- From: Kin Mak <email@hidden>
- Date: Fri, 11 Nov 2011 16:13:49 +0800
The following code used to work fine prior to iOS 5. The dateFromString method seems to stop working on iOS 5 and always returns null. I suspect this is a bug introduced in iOS 5.0. Have anyone encountered the same issue? Or do I miss something here?
Any tips or hints will be highly appreciated.
Thanks,
Kin
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss.SSS zzz"];
.....
//E.g currentString = @"2011-11-11 11:00:00.000 CET";
NSDate *date = [dateFormatter dateFromString:currentString];
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden