[tz] An outline of a possible solution for sensible leap-second support.

Paul Eggert eggert at cs.ucla.edu
Mon Feb 16 05:07:19 UTC 2015


random832 at fastmail.us wrote:

>(extending the range of an existing sub-second field is
> worth considering in some cases, though 32-bit signed nanoseconds only
> have room for one additional second in this way.)

One additional second is all one needs, no?  Two leap seconds are never inserted 
adjacent to each other.  So POSIX's 'struct timespec' suffices to represent leap 
seconds, and there's no need for a new data type here, just new operations on 
the type.  You could start by adding a new clock to clock_gettime, a clock that 
respects leap seconds.



More information about the tz mailing list