LWN.net Logo

Leaping seconds and looping servers

Leaping seconds and looping servers

Posted Jul 10, 2012 16:00 UTC (Tue) by nix (subscriber, #2304)
In reply to: Leaping seconds and looping servers by rschroev
Parent article: Leaping seconds and looping servers

The problem with that ultra-simple case is that it is completely incompatible with the installed base of applications. You *cannot* change gettimeofday() et al to return TAI, because nobody who calls gettimeofday() is expecting it, and because the relevant standard guarantees that adding 86400 to a time will always give you the same time on the next day. A *lot* of code depends on this assumption, and you can't sensibly distinguish between code that wants 'exactly one day from now' and code that wants 'the same time, tomorrow' -- which suddenly become different things, though the authors of the code making that assumption pretty much universally didn't expect that.


(Log in to post comments)

Leaping seconds and looping servers

Posted Jul 10, 2012 16:09 UTC (Tue) by rschroev (subscriber, #4164) [Link]

... and because the relevant standard guarantees that adding 86400 to a time will always give you the same time on the next day. A *lot* of code depends on this assumption, ...
That assumption is already wrong twice a year in places that observe daylight saving time, by a full hour in most places, which is a lot more than the difference between TAI and UTC. Code that depends on it is already incorrect.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds