On Jan 10, 2012, at 11:47 AM, unruh wrote:
>> Ask your operating system vendor, or look at the source code:
>> 
>>  http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/sys/kern/kern_tc.c
>> 
>>> - how can I simulate a leap second, and see how the system reacts?
>> 
>> Change the system time to a few minutes before any particular leap second 
>> that your OS knows about (CF leapseconds file, if it has one) and see.
> 
> No. Your os does not know about leapseconds, and the only way ntpd knows
> is if the leapsecond flag in the packet exchanged with a server is set. 
> Thus you would have to simulate packets coming in to your system. 

In point of fact, ntpd will look for signed leapseconds data from ntpkey_leap-- 
see ntpd/ntp_crypto.c.  I don't see any reason why this won't work with ntpd 
running in orphan mode to simulate a leap-second transition, even it isn't 
talking to an upstream server (or via simulated NTP traffic).

And, also in point of fact, zic used to compile the zoneinfo database can be 
told to pay attention to the NIST leapseconds table to figure out the TAI-UTC 
offset for each of the timezone files it processes.

> I believe that the leapsecond handling is actually in the kernel, not in
> ntpd.

Um.  If you look through the cvsweb link above, you might notice that I was 
pointing to the kernel code for a particular OS which implements leap second 
handling.  

Regards,
-- 
-Chuck

_______________________________________________
questions mailing list
[email protected]
http://lists.ntp.org/listinfo/questions

Reply via email to