On Apr 4, 2008, at 9:41 AM, Torsten Curdt wrote:
Hmmm ...doing this
NSDate *date1 = [[NSDate alloc] initWithString:@"2008-05-01
00:00:00 +0200"];
NSLog(@"date1=%@, %lf", date1, [date1 timeIntervalSince1970]);
and then using the output
date1=2008-05-01 00:00:00 +0200, 1209592800.000000
like this
NSDate* date2 = [[NSDate alloc]
initWithTimeIntervalSinceReferenceDate:1209592800L];
NSLog(@"date2=%@, %lf", date2, [date2 timeIntervalSince1970]);
gives this
date2=2132-11-06 20:46:08 +0100, 5139056768.000000
which is not exactly what I would be expecting.
What's wrong?
Nothing's "wrong"; you're just feeding mismatched data.
"ReferenceDate" != "1970".
_______________________________________________
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]