|
Posted by Robert Newson on 06/23/07 07:06
David T. Ashley wrote:
> I have Red Hat Enterprise Linux 4.
>
> I was just reading up about UTC and leap seconds.
>
> Is it true on my system that the Unix time may skip up or down by one second
> at midnight when there is a leap second?
>
> By "Unix time" I mean the integer returned by time() and similar functions.
>
> I'm concerned about the "down" case. Some of the software I've written
> assumes monotonically-increasing time.
Daylight saving (though how calling one time another saves daylight - there
will be exactly the same amount of daylight in the day regardless of what
you call the hours - I'm still trying to work out) are specified in a config
file (mefinx) and rarely change. Leap seconds I'm not so sure about - they
seem to be added semi-randomly (as and when the extremely constant and
accurate (for some definition of accurate) atomic clocks' day gets behind of
the slowing down earth rotation day).
Leap seconds will then mean that your clock is 1 second fast.
Personally I think you've probably got more concern from using a time server
to sync your computer's clock - the clock in this PC, for example, gains
quite a bit and so resyncing it adjusts it downward every time.
If you've got software that assumes monotonically increasing time, I'd
recommend you get a PC with a clock that loses time (ie it ticks at 1.00001
secs, as opposed to the 0.99999 secs of this PC) so that when re-syncing
your clock it will always adjust upwards. Besides, on a GHz processor,
seconds are rather a coarse measure anyway.
[Back to original message]
|