[time] Leap seconds?
Mon Oct 27 18:58:27 UTC 2008
On Mon, 2008-10-27 at 13:55 -0400, der Mouse wrote:
> > So if leap seconds are arbitraliy added by scientist how does the
> > Linux date command know when one is added.
> (I assume that's a question, despite the non-question punctuation.) It
> knows more or less the same way any modern Unix variant's date command
> does - by using the UTC<->localtime conversion rules on hand.
> > Is that something that's part of the timezone file?
> Basically, yes. (I assume UTC<->localtime conversion code not driven
> off files exists, but it either must have some analog or must ignore
> leap seconds.)
> Yes, this means you need to update your timezone data every time a leap
> second is added, if you care about leap seconds. (Or just every six
> months or so if you don't want to have to follow leap-second news; I
> think leap seconds are introduced only on six-month boundaries.)
UTC<-> Localtime is not affected by leapseconds. GPS time <-> UTC is the
relationship that is affected. Your typical (unix) computer will always
run its local clock in UTC. An stratum 1 NTP-server usually gets its
time from a GPS receiver. It is the responsibility of the
refclock_driver and NTP to insert the leapsecond in a "good" way.
It is not obvious that "good" is the same as stepping the time one
second at the epoch. You might want to make a "smooth" transition by
adjusting the frequency over some time instead. This will give your
clock a more continous time, which might be preferable. This is
especially true if we were ever to loose a second in a leapsecond event.
As long as you have an upstream internet connection to a good NTP server
you should be ok. If you have an isolated network with your own UTC sync
solution you should take more care.
More information about the pool