Skip to content

Normalize UTC to UTC#463

Merged
Manishearth merged 2 commits intoboa-dev:mainfrom
Manishearth:utc-normalize
Jul 29, 2025
Merged

Normalize UTC to UTC#463
Manishearth merged 2 commits intoboa-dev:mainfrom
Manishearth:utc-normalize

Conversation

@Manishearth
Copy link
Copy Markdown
Contributor

@Manishearth Manishearth commented Jul 29, 2025

It seems like there are tests that depend on UTC being normalized to UTC and not Etc/UTC.

Spec text:

ECMAScript implementations must support an available named time zone with the identifier "UTC", which must be the primary time zone identifier for the UTC time zone. In addition, implementations may support any number of other available named time zones.

Broken by #460.

Another fix would be to change this in normalize_identifier_with_compiled

@Manishearth Manishearth requested a review from nekevss July 29, 2025 03:19
@Manishearth
Copy link
Copy Markdown
Contributor Author

@sffc also pointed out that "ECMA canonical" requires a 2 year waiting period before a time zone is considered canonical.

As such we might wish to make this code generic so that we can maintain a list of canonical tz overrides.

@Manishearth Manishearth merged commit f443bf0 into boa-dev:main Jul 29, 2025
8 checks passed
@nekevss
Copy link
Copy Markdown
Member

nekevss commented Jul 29, 2025

requires a 2 year waiting period before a time zone is considered canonical.

Ah, shoot. I recall reading that somewhere at some point, but it totally slipped my mind.

@sffc
Copy link
Copy Markdown
Contributor

sffc commented Jul 29, 2025

icu_time::zone::iana (specifically IanaParser) contains data and abstractions intended to implement the ECMA spec. It was my expectation that temporal_rs would utilize it.

https://unicode-org.github.io/icu4x/rustdoc/icu/time/zone/struct.IanaParser.html

https://unicode-org.github.io/icu4x/rustdoc/icu/time/zone/iana/index.html

For some use cases, the IanaParserExtendedBorrowed::iter_all function may be useful:

https://unicode-org.github.io/icu4x/rustdoc/icu/time/zone/iana/struct.IanaParserExtendedBorrowed.html#method.iter

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.

3 participants