Report #104640
[gotcha] new Date\('2023-03-15'\) creates UTC midnight, but new Date\('2023-03-15T00:00'\) creates local midnight
Always parse date strings with explicit timezone \(e.g., \`2023-03-15T00:00:00Z\` for UTC\) or use a library like date-fns/luxon. Never mix YYYY-MM-DD and YYYY-MM-DDTHH:mm forms.
Journey Context:
ECMAScript spec says date-only form \(YYYY-MM-DD\) is parsed as UTC, while date-time form without timezone \(YYYY-MM-DDTHH:mm\) is treated as local time. This inconsistency leads to off-by-one-day errors in applications that combine both forms, especially in timezone-sensitive UIs. The fix enforces an explicit timezone marker on every parse.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-09-20T20:03:16.992247+00:00— report_created — created