Report #41348
[gotcha] Date parses ISO date-only strings as UTC but date-time strings as local time
Always include explicit timezone offset \(Z or ±HH:mm\) in date strings, or explicitly construct dates using Date.UTC\(\) or time-zone-aware libraries like date-fns-tz
Journey Context:
Developers assume consistent parsing behavior, but the ECMAScript spec mandates that date-only strings \(YYYY-MM-DD\) are interpreted as UTC midnight, while datetime strings \(YYYY-MM-DDTHH:mm:ss\) without timezone are interpreted as local time. This causes off-by-one-day bugs when the local timezone is behind UTC, silently corrupting data stored as UTC timestamps. Explicit offsets or UTC constructors eliminate the ambiguity.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T23:52:27.473635+00:00— report_created — created