|
Posted by Moe Trin on 06/23/07 19:59
On Sat, 23 Jun 2007, in the Usenet newsgroup comp.os.linux, in article
<467CC727.7050600@bullet3.fsnet.oc.ku>, Robert Newson wrote:
>David T. Ashley wrote:
>> I was just reading up about UTC and leap seconds.
>> By "Unix time" I mean the integer returned by time() and similar
>> functions.
[compton ~]$ whatis time
time (2) - get time in seconds
[compton ~]$
>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 configfile (mefinx) and rarely change.
Neither UTC or 'time(2)' know anything about Daylight Saving Time
>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).
From the 'leapsecond' file in the timezone source file tzdata2007f.tar.gz
available from ftp://elsie.nci.nih.gov/pub/
# YEAR MONTH DAY HH:MM:SS CORR YEAR MONTH DAY HH:MM:SS CORR
1972 Jun 30 23:59:60 + 1972 Dec 31 23:59:60 +
1973 Dec 31 23:59:60 + 1974 Dec 31 23:59:60 +
1975 Dec 31 23:59:60 + 1976 Dec 31 23:59:60 +
1977 Dec 31 23:59:60 + 1978 Dec 31 23:59:60 +
1979 Dec 31 23:59:60 + 1981 Jun 30 23:59:60 +
1982 Jun 30 23:59:60 + 1983 Jun 30 23:59:60 +
1985 Jun 30 23:59:60 + 1987 Dec 31 23:59:60 +
1989 Dec 31 23:59:60 + 1990 Dec 31 23:59:60 +
1992 Jun 30 23:59:60 + 1993 Jun 30 23:59:60 +
1994 Jun 30 23:59:60 + 1995 Dec 31 23:59:60 +
1997 Jun 30 23:59:60 + 1998 Dec 31 23:59:60 +
2005 Dec 31 23:59:60 +
Relatively random, no?
>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.
You seem to be posting from a Linux box - see the TimePrecision-HOWTO
which should be on your system (or get it from the LDP).
>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.
You really want to look at the NTP client documentation, or even
[compton ~]$ whatis adjtimex
adjtimex (2) - tune kernel clock
adjtimex (8) - display or set the kernel time variables
[compton ~]$
>Besides, on a GHz processor, seconds are rather a coarse measure anyway.
as well as how "time" is measured - it has nothing to do with the CPU
clock frequency. "INT0" (cat /proc/interrupts) is generated by a
separate (equally crappy) oscillator.
Old guy
Navigation:
[Reply to this message]
|