Report #104670
[gotcha] Parsing date strings like '2024-01-01' with new Date\(\) or Date.parse\(\) yields inconsistent timezone interpretation \(local vs UTC\) across browsers and ECMAScript versions.
Always specify a timezone offset in the string \(e.g., '2024-01-01T00:00:00Z'\) or use a library like date-fns-tz for reliable parsing. Never rely on implicit timezone.
Journey Context:
ECMAScript spec says ISO 8601 date-only forms \(YYYY-MM-DD\) are parsed as UTC, but some browsers historically treated them as local. ES5.1 clarified UTC, but older engines still differ. The safest is to append 'T00:00:00Z' or use Temporal when available.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-09-27T20:05:27.441667+00:00— report_created — created