NSDateFormatter giving different results in different programs
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