• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

unicode-org / icu4x / 16491128682

24 Jul 2025 07:55AM UTC coverage: 72.761% (+0.01%) from 72.75%
16491128682

push

github

web-flow
Disambiguate inconsistent metazones (#6755)

This PR introduces new logic to discriminate DST differences within
metazones for the generic non-location format. It extends the time zone
periods data struct to keep track of which timezone is the "golden" zone
for the metazone, and then checks whether the offsets used by the zone
match the golden zone. There are two directions where they could
disagree:
* The golden zone uses DST, the zone doesn't (e.g. `America/Phoenix` in
`America_Mountain`, `Australia/Brisbane` in `Australia_Eastern`, etc.).
In that case we use (\*drumm roll\*) generic partial location ("Mountain
Time (Phoenix)", "Australian Eastern Time (Brisbane)"). I would actually
prefer to use the standard name here ("Mountain Standard Time",
"Australian Eastern Standard Time"), but those aren't currently loaded
for the generic non-location format (they are for some zones, but only
those that don't have a generic name,
https://github.com/unicode-org/icu4x/pull/6115). It should be noted that
this is not how the generic partial location format is defined in LDML:
we only disambiguate if the offsets that are in use differ, LDML
disambiguates *everything* that's not the golden zone for the user's
locale (each region has it's own golden zone).
* The golden zone doesn't use DST, but the zone does (e.g.
`Europe/London` in the `GMT` metazone). In that case, we fall back to
the location format ("UK Time"), because, unlike in the first case,
during DST the zone is on a time that the metazone never uses.

This also introduces a case for the specific non-location format:
* The golden zone doesn't use DST, but the daylight name is requested.
Even if CLDR has a daylight name here (I think only Namibia right now),
this is probably a CLDR invention, so don't use it and fall back to the
specific location format ("Namibia Daylight Time")

184 of 226 new or added lines in 6 files covered. (81.42%)

5 existing lines in 3 files now uncovered.

59743 of 82108 relevant lines covered (72.76%)

456136.23 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

41.78
/components/datetime/src/pattern/names.rs


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc