Re: [ntpwg] Bug: Status/Summary of slashdot leap-second crash onnew years 2008-2009

From: M. Warner Losh
Date: Wed Jan 07 2009 - 12:27:39 EST


In message: <49647E0F.9030008@xxxxxxxxxxxxxxx>
David Newall <davidn@xxxxxxxxxxxxxxx> writes:
: Linas Vepstas wrote:
: > Currently, the Linux kernel keeps time in UTC. This means
: > that it must take special actions to tick twice when a leap
: > second comes by.
:
: Except it doesn't have to tick twice. Refer to
: http://lkml.org/lkml/2009/1/7/78 in which I show that a time_t (what
: time() returns) counts leap seconds (According to Bernstein this is what
: UTC means), and using zoneinfo, the library processes leap seconds
: correctly.

This is *NOT* POSIX time_t. In order to be posix compliant, you can't
do what Bernstein suggests. You can be non-complaint and deal it with
zoneinfo.

: I just realised that the Notes in man 2 time are confusing and probably
: unnecessary. Suffice to say that (assuming correctly configured
: zoneinfo) time() returns the number of seconds elapsed since start 1970.

That's not POSIX complaint.

Warner
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/