Report #11840
[gotcha] Date constructor parses ISO 8601 date-only strings \(YYYY-MM-DD\) as UTC but date-time strings \(YYYY-MM-DDTHH:mm:ss\) without timezone offset as local time
Always append 'Z' or explicit offset \(\+00:00\) to ISO datetime strings to force UTC parsing, or manually construct dates using Date.UTC\(year, month, day\). Never assume '2023-01-01T00:00:00' is UTC.
Journey Context:
Developers universally assume ISO 8601 implies UTC. However, ECMA-262 specifies that date-only forms are UTC midnight, while datetime forms without offset are interpreted as local time. This causes timezone-shift bugs when servers send '2023-01-01T00:00:00' expecting UTC but clients treat it as local midnight. Date libraries \(luxon, date-fns\) avoid this, but native Date requires explicit 'Z'.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T14:23:18.956371+00:00— report_created — created