[tz] may be a small mistake in the localtime.c code

Zefram zefram at fysh.org
Wed Jun 6 20:53:24 UTC 2012


Olson, Arthur David (NIH/NCI) [E] wrote:
>For (so far unused in the real word) double leap seconds,

There ain't no such thing.  The C standardisation committee, needing
to precisely define struct tm, got misled by the fact that current
procedures allow for up to two leap seconds per *year*, and mistakenly
thought that the two leap seconds could occur on in the same minute.
In fact the definition of UTC only allows for one leap second at a time,
always at the end of a Gregorian month (so up to twelve per year, if
the current preferences between months were overridden).  The latest C
and POSIX specs are clear that tm_sec only goes up to 60.

-zefram


More information about the tz mailing list