Time zone confusion and implementation hints

Garrett Wollman wollman at csail.mit.edu
Fri Jul 2 20:07:05 UTC 2010

<<On Fri, 02 Jul 2010 21:51:03 +0200, Yves Goergen <nospam.list at unclassified.de> said:

> I think I need to retain the original data structure in my code and then
> evaluate it all at runtime, finding the right rule set in the zone, then
> iterating all rules to find the current UTC offset.

I think you are much, much better off parsing the output of zic(1)
rather than its input.  The world really, truly doesn't need any more
buggy, incomplete reimplementations of part of zic.

(You don't need to ship zic or the source files at all in your
package; the output files are machine-independent.  It should not be
hard to write a program that reads in all of the output files and
writes an assembly containing a dictionary of constants with one entry
for each one.)


More information about the tz mailing list