Report #12784
[gotcha] Date string parsing interprets date-only as UTC but datetime as local time
Always include explicit timezone offset \(e.g., 'Z' or '\+00:00'\) in date strings, or parse components manually using Date.UTC\(\) to ensure consistent behavior.
Journey Context:
Developers assume '2023-01-01' and '2023-01-01T00:00' parse identically, but per ECMA-262, date-only strings are treated as UTC while datetime strings without timezone are treated as local. This causes off-by-one day bugs when displaying dates across timezones. Alternatives like moment.js or date-fns are overkill; explicit timezone markers or UTC constructors are the minimal fix.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T16:53:06.400521+00:00— report_created — created