zdump for pre-1901 on 32-bit systems, code patched
Alois Treindl
alois at astro.ch
Wed Dec 17 15:53:39 UTC 2008
I use a 32 bit linux system, and was a bit annoyed that zdump does not
list the zoneinfo tables for years before 1901, due to the limitations
of the 32-bit time_t values.
The binary zoneinfo tables created by zic are correct, as they contain
64-bit data, it is just that the standard zdump cannot print those.
I have patched zdump.c and localtime.c so that it uses 64-bit
(via typedef long long time_t64) instead of the default time_t type, and
now this patched version of zdump also reports the pre-1901 years correctly.
Is there interest to include such a patch in the general distribution of
tzcode ? If yes, I would have to rewrite it more cleanly, and would be
willing to contribute the patch. Currently, I just made a copy zdump64.c
and localtime64.c which with my modifications, but I could create a
clean version with a compile-time switch.
Maintainer of tzcode, please let me know.
Regards
Alois
More information about the tz
mailing list