Re: NSDateFormatter not working on iOS 5.
Re: NSDateFormatter not working on iOS 5.
- Subject: Re: NSDateFormatter not working on iOS 5.
- From: Νικόλας Τουμπέλης <email@hidden>
- Date: Fri, 11 Nov 2011 11:25:45 +0200
Hi Kin,
I've tried the snippet in both Mac OS X and iOS and found that it still works. What are you doing prior to calling dateFromString: ?
Thanks,
Nick
On 11 Νοε 2011, at 10:13 π.μ., Kin Mak wrote:
> 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
--
Nick :wq
_______________________________________________
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