[ntp:questions] Leap second to be introduced in June

Terje Mathisen terje.mathisen at tmsw.no
Wed Jan 21 06:18:14 UTC 2015

Mike S wrote:
> The real problem is systems (POSIX, particularly), which incorrectly
> handle time, despite having over 40 years to get it right. They try to
> please everyone, while pleasing no one. POSIX tracks and does
> calculations on determinate intervals (seconds since 1/1/1970, and every
> minute has 60 seconds), and also tries to handle civil time, which has
> indeterminate intervals (unpredictable 61 second minutes). So it fails
> by trying to do two mutually exclusive things.

Right, POSIX is neither UTC nor TAI: It is mostly a calendar device!

POSIX is really measuring day numbers, but using a counter which is 
scaled by 86400. This means that on any day with a leap second, it is 
not really using SI seconds as the time base.
> It's not a particularly difficult problem to solve (timezone info is
> regularly updated because of civil changes, historical leap seconds
> could be, too), but requires thought about whether specific future
> events should be considered as intervals or absolute time values.

Since there is no way to know about leap seconds several years into the 
future, forward POSIX timestamps must always be considered as absolute 
references. They should never be used for time intervals, even if that 
is the (by far) most common use today. :-(


- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

More information about the questions mailing list