[ntp:questions] Leap second to be introduced in June

Rob nomail at example.com
Mon Jan 12 15:43:47 UTC 2015

Michael Moroney <moroney at world.std.spaamtrap.com> wrote:
> Rob <nomail at example.com> writes:
>>Michael Moroney <moroney at world.std.spaamtrap.com> wrote:
>>> If I have a system synchronized with a public NTP source, which is 
>>> synchronized with an atomic clock that provides leap second info, and
>>> I am watching carefully, what will happen when the leap second hits?  Will
>>> my system suddenly find its clock off by 1 second and slowly drift to
>>> the accurate time provided by the NTP server?
>>That depends on what kind of system it is.
>>Carefully designed systems will do the right thing.
> I was wondering if there was a predefined "right thing" used by ntpd for
> dealing with leap seconds.
> The system I am thinking about (OpenVMS) is probably unfamiliar with 
> others here.  It uses Unix code (ntp 4.2.something) as a base for its NTP
> server.
> Internally, its clock is based on the number of nanoseconds since a base
> date.  It is impossible for it to represent an internal time of 23:59:60.
> Conversion of such a time from ascii to the internal format will result in
> an error.

This is typical for computer systems.  The designers did not take leap
seconds into account, and the only ways for it to deal with them are to
change the base date or to fuzz with the real time counter.

The reprsentation isssue is normally not that important, because it
only occurs during one second.  However, the way it handles the concealment
of that extra second may be important to programs that expect a contiguous
time scale.

Consult your reference manuals to see how it is done.  It is not done by
NTP but by the OS kernel.

More information about the questions mailing list