bww+ at transarc.com
Tue Mar 29 20:40:18 UTC 1994
Garrett Wollman <wollman at adrastea.lcs.mit.edu> writes:
> What you are seeing is the interaction of several different `features'
> of NTP and FreeBSD. I'll try to explain, and again hope that somebody
> out there can provide a complete solution.
Here is an encore of my reply of February 7th.
--- Begin forwarded message
Date: Mon, 07 Feb 1994 18:05:34 -0500 (EST)
From: Bradley White <bww+ at transarc.com>
Subject: Re: leap seconds
To: Garrett Wollman <wollman at emba.uvm.edu>
Cc: Paul Eggert <eggert at twinsun.com>,
Zone Watchers <tz at elsie.nci.nih.gov>, freebsd-tz at freefall.cdrom.com
Message-Id: <09490.760662334 at capitol.transarc.com>
In-Reply-To: Your message of Mon, 7 Feb 94 17:23:21 -0500
<9402072223.AA23255 at bajoran.emba.uvm.edu>
Any system that runs with ``REDO=right_*'', and which therefore wants to
continue to tick normally over leap seconds, needs to do a little bit of
work to generate NTP-style timestamps. That is, NTP-style timestamps are
discontinuous over leaps, while ``REDO=right_*'' time_t's are continuous.
Recent incantations of the `tz' package provide the time2posix() function
to help in mapping between these two formats. For example, in the (old,
version-1) NTP code, you need to change ...
stampp->int_part = htonl(tvp->tv_sec + JAN_1970);
stampp->int_part = htonl(time2posix(tvp->tv_sec) + JAN_1970);
I haven't looked at the (new, version-3) XNTP code, but I imagine the
change needed there is just as trivial.
After that, you will chime NTP harmoniously with the rest of the world,
*and*, you will sail smoothly through leap events without the jitter or
confusion suffered by your NTP peers.
More information about the tz