[ntp:questions] Leap second functional question
david at ex.djwhome.demon.co.uk.invalid
Sun Feb 17 21:58:26 UTC 2008
Dean Weiten wrote:
> 1. Leap second indicator: shows leap second pending
> - how far in advance of the leap second does it start showing it
> pending? One minute? One hour? 12 hours? One day?
At most the whole day. See ntpd/ntp_loopfilter.c for details.
> - I assume that it turns off at the **end** of the leap second it
> announces, correct?
It turns off at the start of the next day.
In line with being tolerant in what you accept, you should probably only
look at the leap indication that existed just before you crossed the
candidate insertion/deletion time, and not assume that it will be unset
on other days.
> 2. NTP timestamp: shows seconds since 1900-01-01 00:00:00
> - is this value corrected for the leap second event? Or does it just
> increase monotonically right on through, expecting the "listener" to
> correct for the leap second?
It behaves the same way as POSIX time, i.e. you can calculate a civil
date and time for any time, except an inserted leap second, without
knowing when leap seconds were used.
> Contrived Example - Adding a Leap Second
> As an example, let's say that there was a leap second to be added on
> 2008-02-10 at 23:59:59 (hmm, or is that 2008-02-11 at 00:00:00?). This
That's not possible. The nearest valid leap second insertion point
would be the end of December 2007. The only other candidate is the end
More information about the questions