[ntp:questions] Google and leap seconds
davehart at gmail.com
Wed Sep 21 15:28:18 UTC 2011
On Wed, Sep 21, 2011 at 15:06, Marco Marongiu <brontolinux at gmail.com> wrote:
> Il 21/09/2011 16:51, Brian Utterback ha scritto:
>> Define "the right way".
> >From my original message, and D.Hart's reply, I'd say the right way
> would be that the system support either to have a second 60 after the
> second 59 (leap insertion) or that second 00 follows 58.
> But this would break POSIX...
Arguably this is what is done by ntpd now, within the important limit
that no platform on which ntpd runs supports a second numbered outside
[0-59]. So either the second numbered 59 is followed by another
second numbered 59, breaking the monotonically increasing requirement,
or similar with the second numbered 0, both of which amount to
stepping the clock back one second, or you choose to slew or "smear"
the one second adjustment over some longer period of time, possibly
stepping the visible clock frequency twice to do so, or using the more
sophisticated google cosine-shaped smear to limit the rate of change
of the leapsec-induced frequency adjustment. The slewing approach has
the upside of no risky backward step, and the downside of up to 1s
offset vs. UTC during the slew.
More information about the questions