Report #62968
[gotcha] Date constructor parses ISO 8601 strings as UTC but other date strings as local time
Always append an explicit timezone indicator \(Z for UTC or \+/-HH:mm\) to ISO strings, or explicitly parse components using Date.UTC\(\) to avoid timezone ambiguity.
Journey Context:
The Date constructor uses different heuristics for different string formats. ISO 8601 formats \(YYYY-MM-DDTHH:mm:ss\) without a timezone are parsed as UTC per spec, while RFC 2822 or other locale formats are parsed as local time. This causes off-by-one-day bugs when servers \(UTC\) and clients \(local\) parse the same date string. The fix enforces explicit timezone semantics rather than relying on the parser's implicit heuristics.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T12:10:25.768898+00:00— report_created — created