[6494] in Kerberos

home help back first fref pref prev next nref lref last post

Re: More gmt_mktime trouble: breaks on systems with leap seconds

daemon@ATHENA.MIT.EDU (Paul Eggert)
Thu Jan 18 03:12:21 1996

To: kerberos@MIT.EDU
Date: 17 Jan 1996 22:25:48 -0800
From: eggert@twinsun.com (Paul Eggert)

jhawk@MIT.EDU (John Hawkinson) writes:

> Basically, POSIX doesn't support leap seconds, so if they're
> in use on your local machine, you should _expect_ things to break.

If memory serves, on some BSD distributions, leap seconds are on by default,
but you can turn them off if you like.  The Posix committee decided
to require systems to pretend that leap seconds don't exist,
but this decision is still controversial in some circles.

> I think the right answer is for autoconf to test for
> HAVE_TIME2POSIX (or whatever) and if so, kerberos should use
> time2posix() and posix2time() in the appropriate places.

I don't think this is portable.  Not all systems that have leap
seconds also have time2posix.

>It would be a bad idea for Kerberos to have kludgey leap second support

Obviously it's better to have _elegant_ leap second support (:-).

gmt_mktime has some other nonportable assumptions,
e.g. that magic number 138 suggests that it assumes 32-bit time_t values.
Perhaps I'll submit a patch.

home help back first fref pref prev next nref lref last post