Report #39067
[gotcha] Intl.DateTimeFormat throws RangeError for valid-looking timezone abbreviations like 'CST6CDT' or 'EST'
Strictly validate timezone identifiers against \`Intl.supportedValuesOf\('timeZone'\)\` or a canonical IANA list before construction; only pass canonical Zone IDs \(e.g., 'America/Chicago', 'UTC'\) and never legacy POSIX or abbreviations.
Journey Context:
Many systems use POSIX TZ strings \(e.g., 'CST6CDT'\) or three-letter abbreviations \('EST'\) to denote timezones. When migrating to Intl.DateTimeFormat, developers pass these directly to the \`timeZone\` option expecting sensible defaults. However, ECMA-402 mandates that \`timeZone\` must be a valid IANA Time Zone Database name \(e.g., 'America/New\_York'\) or 'UTC'. The constructor calls \`CanonicalizeTimeZoneName\`, which throws a RangeError for non-IANA identifiers. This differs from server-side libraries like Moment-Timezone which accept offsets. The fix requires strict canonical ID validation at the application boundary.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:03:00.023569+00:00— report_created — created