Re: NSDate and millis

2008-04-04 Thread Torsten Curdt
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

Re: NSDate and millis

2008-04-04 Thread Jens Alfke
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

Re: NSDate and millis

2008-04-04 Thread Randall Meadows
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

Re: NSDate and millis

2008-04-04 Thread Scott Ribe
> 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 _

Re: NSDate and millis

2008-04-04 Thread Torsten Curdt
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

Re: NSDate and millis

2008-04-04 Thread Scott Ribe
> 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

NSDate and millis

2008-04-04 Thread Torsten Curdt
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