[ntp:questions] Google and leap seconds

Brian Utterback brian.utterback at oracle.com
Wed Sep 21 14:51:46 UTC 2011

On 09/21/11 03:26, Marco Marongiu wrote:
> Almost all here seem to agree on the fact that POSIX systems don't
> manage leap second insertion the right way.

Define "the right way". Do you want the system time to be:

1. Monotonically increasing.
2. Such that interval arithmetic is valid.
3. Match the UTC timescale.
4. Only use POSIX valid timestamps.

Leap seconds mean that one or more of these goals *must* be violated.
Different applications will will prefer to have the system violate
different ones of these goals. As it turns out, you can get a pretty
smooth leap second transition if you are willing to more than just one
of these goals.

The point is, there is no "right way" pr even "best way". There is only
the "way that bests meets your needs".


Always code as if the guy who ends up maintaining your code will be a
violent psychopath who knows where you live. - Martin Golding
Brian Utterback - Solaris RPE, Oracle Corporation.
Ph:603-262-3916, Em:brian.utterback at oracle.com

More information about the questions mailing list