Time Zone Canonicalization
(for Stage 3)
Justin Grant
Invited Expert / volunteer time zone nerd
Agenda
Other info (if needed)
Context & Terms
User complaints
Problems to solve
Temporal.TimeZone.from('Asia/Kolkata');
// => Asia/Kolkata (Firefox uses IANA canonicalization)
// => Asia/Calcutta (Chrome/Safari/Node use CLDR)
What we did during Stage 2
Proposed solutions (from Stage 2 advancement)
Proposed solutions: status
Spec:�Complete, unchanged in Stage 2 except minor editorial tweaks from review feedback�
Tests:�Full coverage in tc39/test262#3837 (100% passing via polyfill)
✔
✔
Proposed solutions: status (cont'd)
Spec:
Editorial note with recommendations for handling renames.
Text was wordsmithed during Stage 2 but no substantive changes.�
Tests:�n/a (recommendations only; not testable)
✔
Proposed solutions: status (cont'd)
No "help implementers converge" normative changes planned in this proposal
Plan:
❌
Open issues we'll move to 402 or ICU/CLDR
Issue | Status |
#25 What if OS reports an ID that ECMAScript doesn't recognize? | No solution has implementer consensus |
#16 Windows APIs may differ from ECMAScript canonicalization | No solution has implementer consensus |
#9 Intra-country merged zones like America/Montreal | Out of scope; CLDR owns solving it |
(may add others) | |
Spec Text
(no changes since since Stage 2 advancement,
except editorial updates & bug fixes)
Don't canonicalize in Temporal.TimeZone constructor
Don't expect canonical ID in internal factory AO
Don't canonicalize when parsing into a slot value
Don't canonicalize in 402 ZonedDateTime.p.toLocaleString
Don't canonicalize in 402 InitializeDateTimeFormat
Add canonicalization to TimeZoneEquals
New public API: TimeZone.p.equals
Recommended waiting period after IANA renames
Stage 3 Status
Feedback / questions?
? ? ?
Stage 3?
Stage 3?
If yes: when & how to implement?�
Thank You! 🙏
Backup Slides
Ensure offset time zone IDs are normalized
(Probably) not problems
The items below have been mentioned as concerns, but we think they are OK for ECMAScript.
Performance notes