Report #103814
[gotcha] new Date\(\) parses identical ISO strings as different time zones
Always include an explicit timezone offset in date-time strings, or explicitly parse with Date.UTC\(\) / a timezone-aware library. Treat bare date strings \('2024-01-01'\) as UTC and local date-time strings \('2024-01-01T00:00:00'\) as local.
Journey Context:
ECMAScript's ISO 8601 parser uses UTC when no time is present, but local time when a time component is present without an offset. This makes new Date\('2024-01-01'\) and new Date\('2024-01-01T00:00:00'\) differ by the host offset. People often assume both are UTC or both are local. The safe fix is explicit offsets or dedicated libraries \(date-fns-tz, luxon, dayjs timezone\) rather than relying on Date.parse heuristics.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-13T04:45:13.171314+00:00— report_created — created