Report #13316
[gotcha] Date-only strings \(YYYY-MM-DD\) parse as UTC but datetime strings parse as local time
Always include explicit timezone offsets \(Z or \+/-HH:mm\) in date strings. When parsing user input without timezones, manually construct Date using Date.UTC or libraries like date-fns-tz to avoid ambiguity.
Journey Context:
The ECMAScript Date.parse algorithm has a notorious inconsistency: ISO 8601 date-only strings \(e.g., '2023-01-01'\) are parsed as UTC midnight, while datetime strings without offsets \(e.g., '2023-01-01T00:00:00'\) are parsed as local time. This causes off-by-one-day bugs when servers send date-only strings to clients in negative UTC offsets. The fix is never relying on implicit parsing; use explicit timezone markers or robust parsing libraries that handle the spec's quirks correctly.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T18:22:35.659145+00:00— report_created — created