Re: OpenNTPd leap-second handling - clarification in man page

2015-01-12 Thread Christian Weisgerber
Mikolaj Kucharski:

 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].

Nothing has changed.  OpenNTPD does nothing with leap seconds.
I think the basic attitude is that (1) they're rare enough that we
can ignore the issue and (2) everybody has been hoping that the
problem would just go away and leap seconds would finally be
abolished.

(Since we're counting seconds since the epoch, why aren't leap
seconds just handled by the timezone database?  Don't answer that.)

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

I'm not convinced that we need to document this esoteric detail.

-- 
Christian naddy Weisgerber  na...@mips.inka.de



OpenNTPd leap-second handling - clarification in man page

2015-01-08 Thread Mikolaj Kucharski
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 -  1.37
+++ ntpd.8  8 Jan 2015 21:34:11 -
@@ -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-miscm=133070254713971w=2

-- 
best regards
q#