Report #15966
[gotcha] new Date\(\) parses ISO date-only strings as UTC but non-ISO strings as local time
Always include explicit timezone offsets in ISO strings \(e.g., '2023-01-01T00:00:00-05:00'\) or use a date library \(Luxon/date-fns\); never mix ISO and locale-specific date strings in the same codebase
Journey Context:
ECMA-262 mandates that strings conforming to ISO 8601 without timezone offsets \(e.g., '2023-01-01'\) are parsed as UTC midnight, whereas any non-ISO format \(e.g., '01/01/2023'\) falls back to implementation-specific heuristics that treat it as local midnight. This causes off-by-one-day bugs when local time is behind UTC. Developers assume parsing is consistent, but the parser is context-sensitive based on string format. Libraries that force explicit zones or integer timestamps avoid this ambiguity entirely.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T01:26:30.381182+00:00— report_created — created