Update timezone data from tzdata 2022g to 2025b#37835
Open
ohbadiah wants to merge 4 commits into
Open
Conversation
Bump chrono-tz 0.8.1 to 0.10.4, which carries IANA tzdata 2025b. This picks up rule changes since 2023: Egypt reinstated DST, Kazakhstan unified on UTC+5, Paraguay abolished DST, and Greenland adopted EU DST rules. Two adaptations to chrono-tz API changes: * Tz::from_str now fails with a structured ParseError instead of a String. * OffsetName::abbreviation returns an Option because tzdata 2024b+ no longer encodes numeric forms like "+05" as abbreviations. Render the numeric form from the offset when absent, matching PostgreSQL. This keeps pg_timezone_names.abbrev non-null. Add regression tests pinning the changed zones and the numeric abbreviation rendering. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Renew the deny.toml duplicate-phf exception for chrono-tz's move from phf 0.11 to 0.12. Accept the new timezone parse error wording from chrono-tz's structured ParseError. Update the mz_timezone_names row count in EXPLAIN snapshots for tzdata 2025a's America/Coyhaique. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Postgres timezone data shapshots are now dumped from a postgres seeded with exactly the IANA release chrono-tz compiles in, rather than from a laptop with sudo date and whatever tzdata it had. That improved mechanism allows us to remove exceptions from the test that our zones match. Add slt assertions for the zone rules changed since 2023, and for historical instants that must keep their old rules. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ate-outdated-timezone-data
ohbadiah
marked this pull request as ready for review
July 24, 2026 16:54
ohbadiah
enabled auto-merge (squash)
July 24, 2026 16:54
antiguru
reviewed
Jul 24, 2026
antiguru
left a comment
Member
There was a problem hiding this comment.
One risk of this PR is that we've previously ingested data with a time zone, casted it to the specific Materialize type, and now see a retraction of the value. The timezone parsing could change, leaving us with invalid retractions. This can only happen through the storage scalar expr, which calls into strconv to parse dates etc. In some sense, this is a backwards-incompatible change to our source ingestion.
antiguru
disabled auto-merge
July 24, 2026 17:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes DB-180
Motivation
A customer reported stale timezone data in
pg_timezone_names: every mismatch traced to IANA rule changes from 2023 onward (Egypt reinstated DST, Kazakhstan unified on UTC+5, Paraguay abolished DST, Greenland adopted EU DST rules). Timezone data is compiled into the binary via the chrono-tz crate, which was pinned at a 2023 release carrying tzdata 2022g.What's here
Tz::from_strerrors became structured (convert explicitly in proto deserialization; one parse error's wording changes).abbreviation()now returns anOptionbecause tzdata 2024b stopped encoding numeric forms like+05as abbreviations. TheDatumconversion would have silently turned that into NULL inpg_timezone_names.abbrev, whose type is declared non-nullable. Instead, render the numeric form from the offset following zic's%zrules, which is what PostgreSQL displays.mz_timezone_namesrow count in EXPLAIN snapshots (tzdata 2025a added America/Coyhaique).regenerate.shnow dumps a postgres container whose/usr/share/zoneinfois built by zic from exactly the IANA release chrono-tz embeds, with the clock faked via libfaketime. With version skew impossible, the allowlist is deleted: any mismatch fails the test.timezone.slt: the changed zones at summer and winter instants (also pinning numeric-abbreviation rendering, e.g. Asia/Kathmandu's+0545), plus historical pins (Almaty pre-unification, Egypt's first reinstated DST summer, Choibalsan's rewritten past).Suggested review order
Cargo.toml,deny.toml— the bump and its lint exception.src/proto/src/chrono.rs, thensrc/expr/src/scalar/func.rs— the API adaptations. The second is the interesting review.src/environmentd/tests/testdata/timezones/regenerate.sh— read before the test changes.src/environmentd/tests/timezones.rs— new header, allowlist removal.test/sqllogictest/timezone.slt— new assertions. The other slt files are two-line expectation updates.Verification
The differential test passes with zero tolerated mismatches, both sides pinned to tzdata 2025b. New slt assertions were cross-checked against system tzdata via zdump. Timezone slt files, clippy, and a workspace check run locally; the full battery is CI's.
Known limitation, deliberate: 2025b is the newest data any published chrono-tz release carries, while IANA is at 2026c (Alberta and Morocco moved to permanent offsets in 2026). Delivering newer data independently of upstream's release cadence is tracked as follow-up work.
This release will update the IANA timezone database from 2022g to 2025b, correcting timezone rules changed since 2023 (Egypt, Kazakhstan, Paraguay, Greenland) and rendering numeric timezone abbreviations (e.g.
+05) inpg_timezone_namesfor zones without alphabetic ones.🤖 Generated with Claude Code