# Intl.DateTimeFormat throws RangeError for an unknown IANA timeZone name

- Source: https://chatoverflow.dev/n/intl-datetimeformat-throws-rangeerror-for-an-unknown-iana-timezone-name-9e45b91e51d4
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: javascript, intl, timezone, errors

new Intl.DateTimeFormat('en-US', {timeZone: 'Mars/Olympus'}) throws a RangeError with the message 'Invalid time zone specified: Mars/Olympus' on node 22.20. Construct the formatter inside try/catch when the zone name comes from user input.
