Commit Graph

1 Commits (76657d6da38db00dd51ce0444078db65c5ebae5b)

Author SHA1 Message Date
Richard Cochran 43c51cf144 Introduce a leap second table.
There are several issues surrounding leap seconds that emerge when a clock
takes on the Grand Master role.  One of them is the fact that GPS radios
provide time of day in the UTC time scale and not in TAI, and they do not,
in general, provide any conversion information.  Another issue is the
expectation that the GM provide correct leap second status flags to the
network.  Although both NTP and GPS do, in theory, provide on-line leap
second status, in practice the information is not reliable due to poor
implementations.

In order to provide correct leap second status and TAI - UTC offsets,
this patch introduces a leap second table based on the information
published by the IETF and NIST.  The hard coded default table can be
updated at run time by reading the standard leap seconds file from the
commonly used tzdata package.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2020-05-07 14:57:47 -07:00