[time-nuts] NTP's discontinuity (it isn't) (was Re: leapseconds, converting between GPS time (week, second) and UTC

Fiorenzo Cattaneo fio at cattaneo.us
Wed Jan 16 16:58:42 UTC 2019


You  are right sorry I said "DST change" while I really meant "leap
seconds" adjustments - apologies for the confusion.
There is nothing wrong per with NTP in applying leap seconds
adjustments in a single 1 step of course, but there were several
outages due to that during the last leap second adjustment, due to
applications not being able to deal with the leap second change.
Which is why google decided to apply the 1 second adjustment smeared
over 24 hours : https://developers.google.com/time/smear

As I mentioned to the other commenter, this goes to show how horrible
is POSIX code at dealing with leap seconds (in fact, by definition it
cannot. POSIX defines a day to always be 86400 exactly, so POSIX code
never really deals with leap seconds). Which implies that most
programmers of time libraries are not really concerned about it, and
I'd do a lot of extra testing before using any library which claims to
be leap-second compliant.

-- Fio Cattaneo

Universal AC, can Entropy be reversed? -- "THERE IS AS YET
INSUFFICIENT DATA FOR A MEANINGFUL ANSWER."

On Wed, Jan 16, 2019 at 7:00 AM Peter Laws <plaws0 at gmail.com> wrote:
>
> On Wed, Jan 16, 2019 at 2:01 AM Fiorenzo Cattaneo <fio at cattaneo.us> wrote:
>
> > headache to worry about (remember all the bugs that pop up even when
> > we switch in and out of DST, like applications crashing because NTP
> > applies the 1 hour change in a discontinous manner
>
>
> NTP does no such thing.  NTP's timescale is in 136-year eras that
> begin on 1900-01-01 (meaning that it rolls in 2036, which will make an
> interesting dry run for the UNIX epoch rollover in 2038).  As the
> author says, ``the NTP timescale [...] knows nothing about days, years
> or centuries, only the seconds since the beginning of the current era
> which began on 1 January 1900. '' (http://doc.ntp.org/4.1.2/leap.htm).
>
> Any DST adjustment is done by the OS where NTP is running.  NTP does
> know leap seconds even if the OS where the daemon is running gets
> confused.  Always fun to watch the clock strike 23:59:60.
>
>
> --
> Peter Laws | N5UWY | plaws plaws net | Travel by Train!




More information about the Time-nuts_lists.febo.com mailing list