Report #71311
[gotcha] Date.parse treats ISO 8601 date-only strings as UTC but datetime strings without Z as local time
Always include explicit timezone offsets \(Z or ±HH:MM\) in ISO strings, or use a robust date library like date-fns-tz or luxon.
Journey Context:
The ECMAScript spec defines that date-only strings \(YYYY-MM-DD\) are parsed as UTC, while datetime strings \(YYYY-MM-DDTHH:mm:ss\) without timezone are parsed as local time. This creates silent bugs when switching between date and datetime representations. Many developers assume consistent behavior, leading to off-by-one-day errors in production when the server timezone differs from the expected timezone.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T02:16:35.718562+00:00— report_created — created