Skip to content

Parsing zone files generated with zic -b slim makes data be bogus #614

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
LarsGullik opened this issue Oct 25, 2020 · 5 comments
Open

Comments

@LarsGullik
Copy link
Contributor

iana-tzdb changed the default for zic from -b fat to -b slim in 2020b. This seems to trigger some
problems with the tzif parser.

In particular the begin/end info in sys_info is not correct anymore:

auto sys = sys_days(2020_y/April/26_d);
auto * europe_oslo = locate_zone("Europe/Oslo");
auto sys_info = europe_oslo->get_info(sys);
ASSERT_EQUALS(sys_days{2020_y/March/29_d} + 1h, sys_info.begin);

Fails with:
expected: 2020-03-29 01:00:00
actual: 1996-03-31 01:00:00

@HowardHinnant
Copy link
Owner

Thanks for the report. The binary db reader is going to need an overhaul to accommodate slim. Do you know if any platform is actually shipping slim?

@LarsGullik
Copy link
Contributor Author

LarsGullik commented Oct 26, 2020 via email

@LarsGullik
Copy link
Contributor Author

A google search shows me that some projects that have their own copy of the zoneinfo files are already switching to using the slim format.

@charno
Copy link

charno commented Nov 18, 2021

zic has changed it's standard behavour. From the Changelog (https://data.iana.org/time-zones/releases/tzcode2021d.tar.gz, file NEWS)

Release 2020b - 2020-10-06 18:35:04 -0700
[...]
zic now defaults to '-b slim' instead of to '-b fat'.

@joemarshall
Copy link

@HowardHinnant We've hit this bug in Apache Arrow also. On emscripten / webassembly python, we don't have embedded tzdata so we use the tzdata package as a source for zone files. The python tzdata package uses -b slim format now; so timezone handling breaks in arrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants