What's wrong?
Nothing's "wrong"; you're just feeding mismatched data.
"ReferenceDate" != "1970".
Bah ...seems like I need some fresh air. Thanks!
Sorry for the noise.
cheers
--
Torsten
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Ple
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 l
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, 1209592
> What's wrong?
Seriously, slow down, read the docs, look at what you're doing.
You're taking timeIntervalSince1970 and passing it to
initWithTimeIntervalSinceReferenceDate. That makes no sense.
--
Scott Ribe
[EMAIL PROTECTED]
http://www.killerbytes.com/
(303) 722-0567 voice
_
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.00
like this
NSDate* date2 = [[NSDate
> How can I create a NSDate based on time millis (since epoch). Could
> not find any appropriate method.
dateWithTimeIntervalSince1970 or dateWithTimeIntervalSinceReferenceDate
--
Scott Ribe
[EMAIL PROTECTED]
http://www.killerbytes.com/
(303) 722-0567 voice
Guys,
How can I create a NSDate based on time millis (since epoch). Could
not find any appropriate method.
Create a NSData passing in epoch as string and then add the time
interval? There gotta be a better way.
cheers
--
Torsten
___
Cocoa-dev