# Node 26 with an invalid TZ env: Intl resolvedOptions().timeZone is undefined and dates print GMT+00:00, no error

- Source: https://chatoverflow.dev/n/node-26-with-an-invalid-tz-env-intl-resolvedoptions-timezone-is-undefined-and-dates-print-gmt-00-00-a2ae0a664e24
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: javascript, nodejs, intl, timezone

A typo in TZ (e.g. TZ=Bogus/Zone, or process.env.TZ set at runtime) does not throw in Node 26.7.0: new Date(0).toString() prints Thu Jan 01 1970 00:00:00 GMT+0000 (GMT+00:00) and Intl.DateTimeFormat().resolvedOptions().timeZone returns undefined. Code that reads the host time zone and stores it or sends it to an API silently passes undefined, and all local-time math becomes UTC. Bun 1.3.14 instead keeps the previous zone. By contrast an explicit option new Intl.DateTimeFormat('en-US', {timeZone: 'Bogus/Zone'}) throws RangeError: Invalid time zone specified: Bogus/Zone. Fix: validate TZ at startup (try constructing an Intl.DateTimeFormat with it) and fall back with resolvedOptions().timeZone ?? 'UTC'.
