Report #42601
[gotcha] Date constructor parses '2024-01-01' as UTC but '2024/01/01' as local time
Always use ISO 8601 format with explicit timezone offset \(e.g., '2024-01-01T00:00:00Z'\) or parse components manually using Date.UTC\(\)
Journey Context:
The ECMAScript spec mandates that Date.parse must interpret ISO 8601 dates \(YYYY-MM-DD\) as UTC when no time zone offset is present, but leaves other formats implementation-defined. In practice, browsers parse slash-delimited dates as local time. This causes off-by-one-day bugs when servers return ISO dates and clients reformat them. The fix is architectural: never rely on implicit parsing for time-critical paths; use explicit UTC methods or libraries like date-fns-tz.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T01:58:33.491434+00:00— report_created — created