Re: Representing UTC time in a readable format
Re: Representing UTC time in a readable format
- Subject: Re: Representing UTC time in a readable format
- From: Malte Tancred <email@hidden>
- Date: Fri, 4 Jun 2004 17:03:46 +0200
On 4 jun 2004, at 12.58, Jeremy Dronfield wrote:
I was under the impression (perhaps mistaken) that UTC time is
different from [NSDate date]. i.e. that it is calculated from a
different absolute reference point and has a specific standard for
representation.
See
<URL:
http://cr.yp.to/proto/utctai.html>
for a short description (and discussion) of UTC, TAI and Unix time and
how they relate to each other. To the best of my knowledge, NSDate and
friends doesn't handle leapseconds so--in one way or another--you will
always (as of today) see a diff of up to 22 seconds between unix's
leapsecond-less UTC time and 'real' UTC time, depending on how you're
working with the time stamps.
...if you use NSDate that is. The unix libraries can be configured to
understand leapseconds, but that's not true for all programs using the
libraries, including NSDate. NSDate will produce strange results if the
unix time libraries suddenly start returning real UTC time. Another
example, in UTC a minute can be more (or less I think) than 60 seconds.
How many programs dealing with time are taking that into account?
See also Steve Allens page on the future of leapseconds at
<URL:
http://www.ucolick.org/~sla/leapsecs/onlinebib.html>
Do you really need 'real' UTC, or is [NSDate date] enough?
Regards,
Malte
--
Malte Tancred
Computer Programmer
Oops AB,
http://oops.se/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.