Hi,

This year we will have positive leap second[1] I've recently got asked
how OpenNTPD handles leap seconds and did anything change from 2012[2].

I've looked at the source code and I don't see any changes from that
time until now that would made me think OpenNTPD handles leap seconds
differently than back then.

Giving that this question may come back again, would it make sense to
explain in ntpd(8) how the daemon handles leap seconds?

As I suck at words, below patch is copy paste from Phil Pennock's
email[2]. Let me know what do you think?

Please CC me with any replies.


Index: ntpd.8
===================================================================
RCS file: /cvs/src/usr.sbin/ntpd/ntpd.8,v
retrieving revision 1.37
diff -u -p -u -r1.37 ntpd.8
--- ntpd.8      12 Feb 2014 15:45:52 -0000      1.37
+++ ntpd.8      8 Jan 2015 21:34:11 -0000
@@ -96,6 +96,16 @@ adjusts the clock frequency using the
 system call to compensate for systematic drift.
 .Pp
 .Nm
+passes on leap second indicators found from servers but otherwise does
+nothing with them.
+In particular, the local clock is never adjusted as a result of leap
+seconds, until after the event when the upstream servers pass on the new
+value of time and
+.Nm
+corrects time accordingly, as though the local system were just off by a
+second (which it literally now is).
+.Pp
+.Nm
 is usually started at boot time, and can be enabled by
 setting
 .Va ntpd_flags


References
 1. http://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat
 2. http://marc.info/?l=openbsd-misc&m=133070254713971&w=2

-- 
best regards
q#

Reply via email to