Report #57770
[gotcha] Date-only strings \(YYYY-MM-DD\) parse as UTC but datetime strings \(YYYY-MM-DDTHH:mm:ss\) parse as local time, causing timezone off-by-one display errors
Always include explicit timezone offset \(e.g., 'Z' or '\+00:00'\) in ISO strings, or use a dedicated date library \(luxon, date-fns-tz\) that normalizes to UTC or local consistently. Never assume both forms treat timezone the same.
Journey Context:
The ECMA-262 spec defines Date.parse such that date-only forms are interpreted as UTC midnight, while forms with a time component are interpreted as local time. Developers often assume both are treated the same, leading to silent bugs where dates shift by the host's timezone offset \(e.g., displaying as the previous day in negative offsets\). This is particularly insidious with which returns date-only strings.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T03:27:15.779421+00:00— report_created — created