18 sec

Garrett Wollman wollman at adrastea.lcs.mit.edu
Tue Mar 29 19:48:27 UTC 1994

<<On Tue, 29 Mar 1994 10:12:19 +0200 (MESZ), Hinrich Eilts <eilts at late.e-technik.uni-erlangen.de> said:

> I synchronized FreeBSD-1.1-BETA to a stratum-1 timeserver by ntpdate
> and xntpd and compared localtime by "date" with it and two other
> machines, which are synchronized by xntpd too.  FreeBSD has a
> difference of -18 secounds to all other machines (a NeXT-Station
> with NeXTStep, a Sun with SunOS 4.x and a HP9000-750 with
> HPUX).

What you are seeing is the interaction of several different `features'
of NTP and FreeBSD.  I'll try to explain, and again hope that somebody
out there can provide a complete solution.  Here are the problems...

1) The timezone database does not reflect the fact that the first time
step, in going from GMT (pre-1972) to UTC (1972 to present) was
actually 10 seconds, and not just one like all subsequent leap

2) The timezone database DOES include all subsequent time steps.

3) The NTP code ``handles'' leap seconds by turning the clock
back when they happen.  By contrast, the timezone code assumes that
time_t's are increasing (which they ought to be; I hold that xntpd's
behavior is simply wrong).  To wit:

NTP code wants:		Real Time	UNIX Time
---------------		---------	---------
30 June 1994, 23:59:59	t		s
30 June 1994, 23:59:59	t+1		s
01 July 1994, 00:00:00	t+2		s+1

Timezone code wants:	Real Time	UNIX Time
--------------------	---------	---------
30 June 1994, 23:59:59	t		s
30 June 1994, 23:59:60	t+1		s+1
01 July 1994, 00:00:00	t+2		s+2

A temporary (ugly hack) solution is to use `posix/your/time/zone'
rather than `right/your/time/zone' (which is the same as
`your/time/zone') for /etc/localtime.


Garrett A. Wollman   | Shashish is simple, it's discreet, it's brief. ... 
wollman at lcs.mit.edu  | Shashish is the bonding of hearts in spite of distance.
formerly known as    | It is a bond more powerful than absence.  We like people
wollman at emba.uvm.edu | who like Shashish.  - Claude McKenzie + Florent Vollant

More information about the tz mailing list