[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Remaining critical bugs (IMHO)



On 30 Apr, Steve Dunham wrote:
> Could you clarify this a little (I know you tried, but...)
> 
> If we define "POSIX time" to be without leap seconds and "true time"
> to be with leap seconds, what does Debian currently display?
> 
> If it is "true time" (with leap seconds) as you seem to say, then why
> is it 20 seconds _behind_ my Slowaris based xntp server?

I'll have a go at clarifying.

POSIX time is defined as the number of seconds since midnight on 1 January
1970, ignoring any leap seconds.  This is the traditional value used by
Unix systems.

The "true" time which Debian uses is the same value, except that any
leap seconds are added to the number of seconds.

So when you set a date with "date" (or any other program which calculates
the number of seconds from a date string), it calculates the number of
seconds according to POSIX.  (Remember, there is *no* portable library
function to extract a date from a string; you have to do it yourself).

Then "date" sets the system clock to the calculated value, and uses
the standard routines to display the changed dates.  Since the value
you set didn't include the leap seconds, and the displayed value takes
them into account, then the displayed date and time will be the number
of leap seconds earlier than the one which you tried to set.

The same effect happens with xntpd.  It ends up feeding a time_t to your
system that doesn't include the 20 leap seconds that Debian's timezone
routines expect; so the clock ends up 20 seconds slower.

I'd argue that this *is* a critical bug.  Consider the effects of clock
skew when you're using NFS to mount filesystems between Debian and
Non-Debian systems.  This is a subtle but unpleasant problem, and it
can cause all sorts of strange effects.  That's why ntpd was invented
in the first place; but it won't fix this problem.

(For those who don't know, clock skew is the effect of two machines
writing files in the same directory with different timestamps.  Screws
up make good and proper, for a start)

Hope this helps
-- 
M a l c . . .            |  "A wrong parameters may be caused the mainboard
(malc@thing.demon.co.uk) |   out of order."  -- Pentium motherboard manual.


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: