Skip to content

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

Open

Description

@LarsGullik

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

Activity

  1. HowardHinnant commented on Oct 25, 2020

    @HowardHinnant
    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?

  2. LarsGullik commented on Oct 26, 2020

    @LarsGullik
    ContributorAuthor
  3. LarsGullik commented on Oct 26, 2020

    @LarsGullik
    ContributorAuthor

    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.

  4. charno commented on Nov 18, 2021

    @charno

    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'.
    
  5. joemarshall commented on Jun 14, 2024

    @joemarshall

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions