• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSDateFormatter Breaks on non-English OS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSDateFormatter Breaks on non-English OS
      • From: mmalc Crawford <email@hidden>
References: 
 >Re: NSDateFormatter Breaks on non-English OS (From: Trygve Inda <email@hidden>)

  • Prev by Date: Re: what user does a PreferencePane run as?
  • Next by Date: Re: what user does a PreferencePane run as?
  • Previous by thread: Re: NSDateFormatter Breaks on non-English OS
  • Next by thread: Re: NSDateFormatter Breaks on non-English OS
  • Index(es):
    • Date
    • Thread