Report #3626
[gotcha] Date constructor parses ISO 8601 date-only strings as UTC but datetime strings as local time
Always include an explicit time zone offset \(e.g., 'Z' or '\+00:00'\) in ISO strings, or use separate arguments \(year, month, day\) for local midnight construction.
Journey Context:
ES2015 changed parsing so '2024-01-01' is UTC midnight, but '2024-01-01T00:00' is local midnight. This causes off-by-one-day bugs when deploying to servers in different timezones than dev machines. Date.parse has the same asymmetry. Using explicit offsets or the multi-argument constructor avoids the ambiguity entirely.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T17:47:00.589793+00:00— report_created — created