[tz] tzfiles contain Unix epoch for the first transition time
Paul Eggert
eggert at cs.ucla.edu
Sat Aug 15 03:16:52 UTC 2015
Robert Elz wrote:
> a very rough calculation (and assuming
> I did it correctly) means that the format you described should be able to
> represent +/- (almost) 30,000 years from the epoch - that's something more
> that 27000 BC.
I think MS-Windows DateTime is unsigned internally, so it can't represent any
times before 0001-01-01 00:00:00 UTC. It's a bit confusing, as MS-Windows has
several time types each with their own epoch and tick size and range.
> I have no idea if that -7537 is 7537 BC or 7538 BC (ie: whether it is
> assumed that there was a year 0 or not). I suspect that this all happens
> just by accident,
No accident. NetBSD assumes year 0. tzcode is the same, as is GNU/Linux and
Solaris. There is also year -1, etc. For example, the tzcode 'date' command
does this:
$ date -u -r -62135596800
Mon Jan 1 00:00:00 GMT 0001
$ date -u -r -62135596801
Sun Dec 31 23:59:59 GMT 0000
$ date -u -r -62167219200
Sat Jan 1 00:00:00 GMT 0000
$ date -u -r -62167219201
Fri Dec 31 23:59:59 GMT -001
$ date -u -r -67767978442512096
Tue Jan 1 02:38:24 GMT -2147479778
GNU/Linux 'date' is similar except it says 'UTC' rather than 'GMT' (of course
neither abbreviation is correct for these old time stamps).
More information about the tz
mailing list