Report #101993
[gotcha] Date constructor parses the same ISO string as local time or UTC depending on the presence of a timezone
Treat ISO 8601 strings without a timezone offset as local-time inputs; always include an explicit 'Z' or offset, or use Date.UTC / date-fns / Temporal for unambiguous construction.
Journey Context:
new Date\('2024-01-01'\) is parsed as local midnight, but new Date\('2024-01-01T00:00:00Z'\) is parsed as UTC midnight. The spec splits behavior at the 'Z' or offset. Teams often assume ISO strings are UTC by default and then see off-by-timezone bugs in CI, Docker, or user machines. Prefer explicit constructors \(Date.UTC, Temporal.ZonedDateTime\) over implicit parsing for anything serialized or compared.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-08T04:47:32.771896+00:00— report_created — created