Report #9133
[gotcha] Date constructor parses date-only strings as UTC but datetime strings as local time
Always append T00:00:00Z for UTC midnight or use explicit timezone offsets; never rely on bare date strings
Journey Context:
ISO 8601 specifies that date-only \(YYYY-MM-DD\) should be interpreted as UTC in JS, but date-time without timezone \(YYYY-MM-DDTHH:mm:ss\) is interpreted as local time. This causes off-by-one errors in negative timezones \(e.g., US\) where the date rolls back to the previous day. Developers often test in UTC\+ zones where the bug is masked.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T07:20:38.750586+00:00— report_created — created