Report #58546
[gotcha] new Date\(\) interprets ISO date-only strings as UTC but date-time strings as local time
Always append 'T00:00:00Z' for UTC midnight or explicitly parse components using Date.UTC\(\) / temporal polyfills
Journey Context:
ECMAScript spec defines that date-only strings \(YYYY-MM-DD\) are parsed as UTC midnight, while any string containing a time component \(T...\) is parsed as local time. This causes off-by-one date errors when servers return date-only strings and clients display them in negative timezones. Common mistake is assuming '2023-01-01' means local midnight. The alternative of parsing manually or using Z suffix is required for consistency.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T04:45:28.324327+00:00— report_created — created