On 4 Apr '08, at 8:41 AM, Torsten Curdt wrote:
NSDate *date1 = [[NSDate alloc] initWithString:@"2008-05-01 00:00:00 +0200"];NSLog(@"date1=%@, %lf", date1, [date1 timeIntervalSince1970]);
Whatever default date formatter is being used doesn't support parsing milliseconds. You're lucky it even matches the same syntax you're using (there are zillions of incompatible date formats.)
Moral of the story: Never rely on a default date formatter. Never call -[NSDate initWithString:]. Create your own NSDateFormatter instance and set its format string exactly the way you want it.
—Jens
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]