Report #92196
[gotcha] Date constructor parses '2023-01-01' as local time but '2023-01-01T00:00:00' as UTC
Always use ISO 8601 strings with explicit timezone offsets \(Z or ±HH:MM\), or use a dedicated date library \(date-fns, luxon\) that disambiguates input strings.
Journey Context:
The ECMAScript spec treats date-only strings \(YYYY-MM-DD\) as local time, but date-time strings \(with T separator\) as UTC if no timezone is specified. This silent timezone shift causes data integrity issues when APIs return date-only strings that are then parsed and serialized back with timezone offsets, shifting the calendar day. The fix requires consistent use of explicit offsets or libraries that force explicit timezone handling.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:20:43.608819+00:00— report_created — created