Re: [chrony-dev] Fw: leap seconds correction |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
On Wed, Feb 12, 2014 at 02:14:06AM +0100, Marek Behun wrote:
> > > http://www.ucolick.org/~sla/leapsecs/right+gps.html
The last two paragraphs on that page imply that chrony smears the leap
second, that's not true. Similarly to ntpd, it just tells the kernel
to insert/delete the leap second and the Linux kernel does it by
stepping the clock back/forward by one second at midnight.
> I was thinking about how to do this the best way and I have decided to
> write a compatibility library (which will override time
> getting/setting system calls with LD_PRELOAD), so the code of
> ntp/chrony or any other software that needs to think system clock is
> represented in classic POSIX timestamp doesn't need to be changed.
> You can find it at https://github.com/elkablo/time2posix .
That's pretty cool.
Did you test how it works during leap second? I suspect the ambiguity
in the UTC->right conversion when leap second is inserted could cause
some troubles. In linuxptp (PTP uses TAI) the problem is avoided by
suspending the operation during that second. I think chronyd and ntpd
would need to do that too.
Also, you might need to intercept recv() and similar to adjust the
timestamps in the SO_TIMESTAMP and SO_TIMESTAMPING control messages.
--
Miroslav Lichvar
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.