In message: <43E3E944.80406_at_usa.net>
James Maynard <james.h.maynard_at_usa.net> writes:
: Thanks, guys, for your feedback. Here's another iteration.
:
: The numbering of NTP seconds in the vicinity of a leap second seems to
: differ from one document to another. Here I follow the NTP (version 3)
: specification, RFC 1305, in which the Leap Indicator (sys.leap,
: peer.leap, pkt.leap) is 01 if a positive leap second is to occur at the
: end of the current UTC day, and 00 if no leap second is pending.
:
: UTC = 2005-12-31 23:59:59, NTP seconds = 3 345 062 399, LS_pending = 01
: UTC = 2005-12-31 23:59:60, NTP seconds = 3 345 062 400, LS_pending = 01
: UTC = 2006-01-01 00:00:00, NTP seconds = 3 345 062 400, LS_pending = 00
>> The obvious question raised by this scenario is what happens during
>> the leap second itself when NTP time stops and the clock remains
>> unchanged. If the precision time kernel modifications have been
>> implemented, the kernel includes a state machine that implements the
>> actions required by the scenario. [[ At the first occurrence of second
>> 3,124,137,600, the system clock is stepped backward one
>> second.]] However, the routine that actually reads the clock is
>> constrained never to step backwards, unless the step is significantly
>> larger than one second, which might occur due to explicit operator
>> direction. In this design time stands still during the leap second,
>> but is correct commencing with the next second.
So internally, once we hit the leap second time, we step backwards.
Some systems contrain the values returned from gettimeofday to not
notice the step, while others do not. This talks about incrementing
the time by 1 unit (usually a nanosecond or microsecond) while time is
catching up.
http://www.eecis.udel.edu/~mills/leap.html
So it very much depends on if you are looking inside the kernel or
outside the kernel for what the correct values are. If you freeze
time, then doing a time exchange during a leap second is going to give
bogus results. If you step it back, then it will give good results,
but there are other bad effects.
Basically, no matter what you do, it is broken (unless you tick in TAI
time).
Warner
Received on Fri Feb 03 2006 - 21:15:18 PST