Report #101031
[gotcha] Parsing '2024-01-01' gives UTC, but '2024-01-01T00:00:00' gives local time
Always include an explicit timezone offset \(e.g. 'Z' or '\+00:00'\) or parse with a dedicated library/date-fns/Temporal. Treat native Date string parsing as implementation-sensitive.
Journey Context:
ECMAScript Date.parse distinguishes ISO 8601 date-only strings \(YYYY-MM-DD\) as UTC, while date-time strings without a timezone are parsed as local time. This causes off-by-one-day bugs when UTC midnight rolls back to the previous local day. Using Date.UTC or a library normalizes behavior and avoids timezone surprises; relying on the native parser across browsers/Node versions is risky.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-06T04:51:49.982168+00:00— report_created — created