FW: Java zoneinfo reader

Paul Eggert eggert at twinsun.com
Tue Jun 6 23:11:30 UTC 2000


   Date: Tue, 06 Jun 2000 18:45:29 -0400
   From: "Stuart D. Gathman" <stuart at bmsi.com>

   zic would add extra "transitions" (with the same offset) when
   transitions are more than 2**32 secs apart.  Think of it as 64 bit
   values with differential compression.

Good point; didn't think of that.  However, how would this address C
code like the following?

    time_t t = 60000000000000000;
    struct tm *tm = gmtime (&t);

This yields a time stamp in the year 1901324310.  We can't store a
table of all the transitions until then -- that'd take too much space.
So if we want to handle extreme examples like this, we need an
algorithmic prediction of future transitions.

I realize that any prediction of future transitions will be incorrect,
but the most useful prediction in practice is to use the current
rules, and it'd be nice if we could support this into the indefinite
future, at least for the common cases.

Here's an idea.  All the current tz rules are rational, in the sense
that the pattern of transitions repeats after a while.  So if we could
append a "go back N transitions" instruction at the end of the
compiled tz file, a compiled tz file could represent any set of
planned transitions that a tz input file can represent.



More information about the tz mailing list