Report #17039
[gotcha] Date constructor parses YYYY-MM-DD as UTC but YYYY-MM-DDTHH:mm:ss as local time
Always include an explicit timezone offset \(e.g., 'Z' or '\+00:00'\) or parse dates manually; use Temporal API for new code.
Journey Context:
Developers assume consistent timezone handling. ISO 8601 dates without time are parsed as UTC midnight, but adding a time component switches parser to local timezone. This causes off-by-one errors in date-only UIs. Explicit offsets or libraries like date-fns-tz eliminate ambiguity.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T04:19:19.287974+00:00— report_created — created