Report #5951
[gotcha] Intl.DateTimeFormat throws or fails silently on non-canonical IANA timezone names
Always validate and normalize timezone names using \`Intl.supportedValuesOf\('timeZone'\)\` before passing to DateTimeFormat. Ensure canonical casing \(e.g., 'UTC', 'America/New\_York'\) and avoid deprecated identifiers like 'US/Pacific'. For user input, maintain a mapping of aliases to canonical IANA names.
Journey Context:
Developers often treat IANA timezone names as case-insensitive or assume common aliases work across platforms. However, ECMA-402 requires strict validation of the \`timeZone\` option against IANA's Time Zone Database. Non-canonical casing \('utc' vs 'UTC'\) throws RangeError. Deprecated links \(e.g., 'US/Pacific' linking to 'America/Los\_Angeles'\) may work in some ICU versions but fail in others, causing sporadic crashes in production. Unlike moment.js or luxon which normalize aggressively, Intl.DateTimeFormat is strict. Developers must pre-validate against \`supportedValuesOf\` \(ES2023\) or use a normalization library to ensure portability.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T22:43:30.128615+00:00— report_created — created