[Javascript] OT: leap seconds (was: Is integer?)

Steve Clay sclay at ufl.edu
Wed May 31 09:19:51 CDT 2006


Tuesday, May 30, 2006, 7:24:19 PM, tedd wrote:
> No, there is a lot of computation involved.

David was just suggesting that, unlike leap years, you can't predict leap
seconds with an algorithm alone; you need /observed data/.

We don't have to worry about leap seconds because Unix time isn't really a
count of seconds, but rather a mapping of the first 86400 seconds of each
UTC day. The mapping is discontinuous on longer/shorter days (eg. added
leap seconds have no Unix time equivalent), but it guarantees that
adding/subtracting 86400 always gives you the same time the next/previous
day (if that time exists).
http://en.wikipedia.org/wiki/Unix_epoch#Encoding_time_as_a_number

Steve
-- 
http://mrclay.org/




More information about the Javascript mailing list