Report #14365
[gotcha] Date.parse treats ISO date-only as UTC but date-time as local time
Always append 'Z' for UTC or explicit ±HH:mm offset to ISO strings; never mix date-only and date-time formats without explicit timezone handling
Journey Context:
ECMAScript specifies that date-only strings \(YYYY-MM-DD\) are parsed as UTC midnight, while date-time strings \(YYYY-MM-DDTHH:mm:ss\) are parsed as local time. This creates silent off-by-one date bugs when the local timezone is behind UTC \(e.g., GMT-0500\) because the date-only parses to a time that displays as the previous day locally. Developers often assume both formats use local time or both use UTC. The fix requires explicit Z for UTC or using libraries like date-fns-tz that normalize the ambiguity.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T21:20:48.955925+00:00— report_created — created