Hi All,
We have encountered an issue after upgrading to tzcode2025b, where zoneinfo files that were previously generated in TZif3 format are now being generated in TZif2 format.
This change appears to be due to the removal of the forced version in the writezone() call in zic.c file.
Upon investigation, we found that:
->The logic in stringrule() that sets compat = 2013 based on wdayoff is not meaningful in practice.
->For rules like Sun>=8, wdayoff = 0, so compat = 0, and the compiler now generates TZif2.
->This behavior change appears to result from the removal of the forced version and the introduction of dynamic version selection logic.
For example, in the northamerica file, we have:
Rule US 2007 max - Mar Sun>=8 2:00 1:00 D
Rule US 2007 max - Nov Sun>=1 2:00 0 S
These rules are used by zones such as America/Chicago and others.
Since Sun>=8 results in wdayoff = 0, the compat value remains 0, and the compiler now generates TZif2 instead of TZif3.
This change affects all zones relying on similar rules, even though the rule definitions themselves have not changed.
Specifically, the change from:
writezone(zpfirst->z_name, envvar, ZIC_VERSION); // older code
to:
writezone(zpfirst->z_name, envvar, version, defaulttype); // new code
has caused the compiler to emit TZif2 for rules that previously resulted in TZif3.
We believe this logic does not reliably reflect the need for TZif3 and may lead to inconsistent or unexpected output formats.
We would appreciate your thoughts on this and whether a patch or enhancement is planned to address it.
Best Regards,
Jeelan