Re: NSDateFormatter Breaks on non-English OS
Re: NSDateFormatter Breaks on non-English OS
- Subject: Re: NSDateFormatter Breaks on non-English OS
- From: Trygve Inda <email@hidden>
- Date: Wed, 01 Jul 2009 00:08:38 +0000
- Thread-topic: NSDateFormatter Breaks on non-English OS
So,
In the International Pane of System prefs, I have set the Region to Germany
Then in my app I call:
NSString* myDateString = @"Tue Jun 30 15:53:24 UTC 2009";
NSDateFormatter* theFormat = [[NSDateFormatter alloc] init];
[theFormat setFormatterBehavior:NSDateFormatterBehavior10_4];
[theFormat setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]];
[theFormat setDateFormat:@"EEE MMM dd HH:mm:ss zzz yyyy"];
myDate = [myFormatter dateFromString:myDateString];
But myDate is always nil. If I set my Region to US or UK all is well.
???
Trygve
_______________________________________________
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