Re: NSDate and millis
Re: NSDate and millis
- Subject: Re: NSDate and millis
- From: Torsten Curdt <email@hidden>
- Date: Fri, 4 Apr 2008 17:41:16 +0200
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?
cheers
--
Torsten
_______________________________________________
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