• 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 giving different results in different programs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSDateFormatter giving different results in different programs


  • Subject: NSDateFormatter giving different results in different programs
  • From: Derrick Bass <email@hidden>
  • Date: Sun, 13 Apr 2008 22:21:05 -0700

I have a framework with a method that uses NSDateFormatter to convert an NSString to an NSDate:
NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease];
NSDate *date = [dateFormatter dateFromString:creationDateString];


creationDateString is set to @"Sun Mar 18 22:17:02 2007"

In one program that links to this framework, the date is getting parsed correctly. But in another, the very same string is coming back as "1969-12-31 16:00:00 -0800"! Using - [getObjectValue:forString:range:error:] gives the same results.... no error.

What could be causing the different behaviors and how do I get the string to parse no matter what?

Thanks!

Derrick

_______________________________________________

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 giving different results in different programs
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: Using Properties at Outlets
  • Next by Date: Plugin Information
  • Previous by thread: Re: Using Properties at Outlets
  • Next by thread: Re: NSDateFormatter giving different results in different programs
  • Index(es):
    • Date
    • Thread