[ntp:questions] Leap seconds

Alain alainm at pobox.com
Mon Jan 24 15:37:16 UTC 2005



Enrique Perez-Terron escreveu:
[...]
> Please correct me if I am wrong.
> 
> This raises the question what will time(NULL) return at
> 23:59:58, 23:59:59, 23:59:60, 00:00:00, and what will gettimeofday()
> return - and when will it return? (I have seen a proposal to have
> gettimeofday() sleep until 00:00:00 if called after 23:59:59.9999 but
> before 00:00:00.)
> 
> Excuse my ignorance, does ntp count the time only in standard calendar
> ways, or does it have a notion of seconds since an epoch?  In case of
> the latter, does this number increase monotonically at a constant rate?
> Is this time available for applications outside ntpd?

It looks like the "safest way on critical systems" and "I don care much 
but want to be on the safe side" would be not to step and just skew that 
extra/missing second. Would the "-x" option do that?

Would that be ok for a typical small-business where ntp is only used for 
loging intrusion detection and 1s is good enough?

Alain




More information about the questions mailing list