[ntp:hackers] Leap second list file
imp at bsdimp.com
Mon Jan 16 03:14:25 UTC 2012
On Jan 15, 2012, at 4:10 PM, Hal Murray wrote:
>> imp at bsdimp.com said:
>>> Actually, part of the protocol indicates the leap second is coming up.
>>> You don't have to copy leap second files to get the notification. See
>>> RFC 5905 Section 7.3 on the LI bits. It gets set during the month in
>>> which the leap second is to be added or removed.
>> Except that you don't know how many leap seconds have elapsed. This makes
>> running the 'right' time zone impossible.
> I missed a step. How did we get from leap seconds to time zones?
right timezone files are a special beast. You have to know how many leap seconds have occurred to get the offset in the kernel to UTC corrected properly.
> The LI bits in the NTP packets say insert/delete a second at the end of this
> month. That happens at midnight UTC, not local midnight.
Correct. It has nothing to do with local time.
> You don't need to know how many leap seconds have already elapsed in order to
> process the next one. All you need to know is the local time and whether to
> insert or delete a leap second, or do nothing.
Actually you do. When running the 'right' timezone files, leap seconds aren't handled in the kernel with the stutter step that ntpd likes to do, but rather with the time printing functions after the fact.
> I've seen proposals to distribute leap second info in the time zone files,
> but no tie in to the above quoted text. That seems like a good idea and
> something like it is probably necessary given that POSIX pretends they don't
The 'right' timezone files have been in the Olsen database files for about 15 years now.
More information about the hackers