[tz] tzcode-2014c breaks applications that use the binary tz files
Paul Eggert
eggert at cs.ucla.edu
Fri May 23 21:10:58 UTC 2014
On 05/23/2014 01:51 PM, Arthur David Olson wrote:
> Do we face a similar challenge in the 32-bit realm?
Not for Glib, no. It uses 64-bit signed integers internally.
If this were a problem in the 32-bit realm, wouldn't we have already run
into it? Some of tzdata's transitions are before 1901 and thus predate
the 32-bit window, so I assume that for many years we've been
approximating them with a transition at -2**31 -- is my assumption
incorrect?
One other thought, just for fun. In the 64-bit realm, we could use the
timestamp of the Big Bang, as time stamps before then are physically
suspect anyway. If we use POSIX time, our current best guess is that
the Big Bang happened 13.82 billion years ago, which (if we use the
POSIX origin of 1970) would make it -13,820,000,000 * 365.2425 * 86400,
or -436117076640000000 -- a 59-bit number. A downside of using
-436117076640000000 is that we'd need to update that number as we get
better estimates of when the Big Bang occurred, but maybe we could
consider this to be part of the fun. After all, if Unix had been
developed on a 64-bit machine and had used the Big Bang for the time_t
origin, a lot of bugs would have been avoided in the first place....
More information about the tz
mailing list