Skip to content
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

Editorial: Handle case when backzone doesn't contain link #938

Closed
wants to merge 1 commit into from

Conversation

anba
Copy link
Contributor

@anba anba commented Nov 11, 2024

A couple of links aren't in backzone. Change the assertion to an if-step to correctly handle this case.

List of time zones which weren't correctly handled:

Africa/Kinshasa
Africa/Lubumbashi
America/Atikokan
America/Blanc-Sablon
America/Creston
Antarctica/DumontDUrville
Antarctica/McMurdo
Antarctica/Syowa
Asia/Kuala_Lumpur
Europe/Busingen
Pacific/Chuuk
Pacific/Majuro
Pacific/Midway
Pacific/Pohnpei
Pacific/Wake

For example "Africa/Kinshasa", which is a zone in backzone:

  • "Africa/Kinshasa" is a link to "Africa/Lagos" per backward.
  • The region code for "Africa/Lagos" is "NG", the region code for "Africa/Kinshasa" is "CD". That means the condition in step 5.b.iii.3 evaluates to false.
  • There are two entries for the region "CD" in zone.tab: "Africa/Kinshasa" and "Africa/Lubumbashi". That means the condition in step 5.b.iii.4.b also evaluates to false.
  • "Africa/Kinshasa" is a zone in backzone, so the loop in step 5.b.iii.4.c.iii won't find any entries.

All other cases are also zones in backzone, except for "Europe/Busingen", which is always a link. "Europe/Busingen" links to "Europe/Zurich" per backward, but is still a primary identifier in ECMA-402, because Büsingen is politically a part of Germany, so it shouldn't be merged with the time zone for Zürich (Switzerland).

A couple of links aren't in `backzone`. Change the assertion to an
if-step to correctly handle this case.

List of time zones which weren't correctly handled:
```
Africa/Kinshasa
Africa/Lubumbashi
America/Atikokan
America/Blanc-Sablon
America/Creston
Antarctica/DumontDUrville
Antarctica/McMurdo
Antarctica/Syowa
Asia/Kuala_Lumpur
Europe/Busingen
Pacific/Chuuk
Pacific/Majuro
Pacific/Midway
Pacific/Pohnpei
Pacific/Wake
```

For example "Africa/Kinshasa", which is a zone in `backzone`:
- "Africa/Kinshasa" is a link to "Africa/Lagos" per `backward`.
- The region code for "Africa/Lagos" is "NG", the region code for
  "Africa/Kinshasa" is "CD". That means the condition in step 5.b.iii.3
  evaluates to false.
- There are two entries for the region "CD" in `zone.tab`:
  "Africa/Kinshasa" and "Africa/Lubumbashi". That means the condition in
  step 5.b.iii.4.b also evaluates to false.
- "Africa/Kinshasa" is a zone in `backzone`, so the loop in step
  5.b.iii.4.c.iii won't find any entries.

All other cases are also zones in `backzone`, except for
"Europe/Busingen", which is always a link. "Europe/Busingen" links to
"Europe/Zurich" per `backward`, but is still a primary identifier in
ECMA-402, because Büsingen is politically a part of Germany, so it
shouldn't be merged with the time zone for Zürich (Switzerland).
@anba anba requested a review from justingrant November 11, 2024 07:32
@justingrant
Copy link
Contributor

Hmmm, I'm not sure I understand the problem. Could you clarify?

The current spec in says at 5b:

If identifier is a Link name in the IANA Time Zone Database and identifier is not present in the “TZ” column of zone.tab of the IANA Time Zone Database, then

If the identifier is in zone.tab, then it's a primary identifier and we never have to look in backzone. The only purpose of the backzone logic is to handle links that aren't in zone.tab.

@anba
Copy link
Contributor Author

anba commented Nov 12, 2024

Whoops, seems like I've skipped over the "[...] identifier is not present in the “TZ” column of zone.tab" part of the condition. Sorry about the false alarm!

@anba anba closed this Nov 12, 2024
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

Successfully merging this pull request may close these issues.

2 participants