• 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
NSDateFormatter not working on iOS 5.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSDateFormatter not working on iOS 5.
      • From: Νικόλας Τουμπέλης <email@hidden>
  • Prev by Date: Re: Allocating too much memory kills my App rather than returning NULL
  • Next by Date: Re: Allocating too much memory kills my App rather than returning NULL
  • Previous by thread: Re: DTS
  • Next by thread: Re: NSDateFormatter not working on iOS 5.
  • Index(es):
    • Date
    • Thread