[tz] zoneinfo vs zoneinfo-leaps

John Haxby john.haxby at oracle.com
Mon Nov 16 22:07:19 UTC 2015


> On 16 Nov 2015, at 21:42, Random832 <random832 at fastmail.com> wrote:
> 
> Ken Murchison <murch at andrew.cmu.edu <mailto:murch at andrew.cmu.edu>> writes:
>> Having studied up the tzfile(5) format and written some code to
>> produce these files, I'm wondering why the files in zoneinfo-leaps
>> include the leap records AND adjust the transition times by the
>> appropriate number of leap seconds.  This seems redundant to me.  If
>> the file includes the leap second records, why not let the consumer
>> adjust the transitions?
> 
> Because the values are meant to be time_t timestamps, and for these
> files they're intended for a notional system in whose time_t 946684822
> rather than 946684800 represents a date of 2000-01-01 00:00:00 UTC..


As I’m sure a good many people reading this are aware …

Also Posix specifically says that there are 86400 seconds in a day, every day, without exception.   It allows for the time 23:59:60 by saying that the time in seconds is /approximately/ the time since midnight at the start of 1970 …

It’s a mess, but it’s a well-intentioned mess.   t + 86400 is this time tomorrow.   For those few people who are prepared to do arithmetic “properly” (tomorrow might be t + 86399 or t + 86401) the timezone files including leap seconds are available.   That’s not a posix system though … you pays your money, you takes your choice.

jch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mm.icann.org/pipermail/tz/attachments/20151116/9c7da3e8/attachment.htm>


More information about the tz mailing list