Report #16897
[gotcha] Date constructor parses ISO date-only strings as UTC but ISO datetime strings as local time
Always include explicit timezone offset \(Z or \+/-HH:MM\) in ISO strings; use libraries like date-fns-tz for user input
Journey Context:
The ES spec mandates that date-only forms \(YYYY-MM-DD\) are interpreted as UTC midnight, while datetime forms \(YYYY-MM-DDTHH:mm:ss\) without offset are interpreted as local system time. This causes off-by-one-day bugs when servers \(UTC\) parse date-only strings vs clients \(local\). Common mistake is assuming both are UTC or both are local. Alternatives like moment.js are deprecated; modern solution is explicit offsets or temporal polyfill.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T03:54:44.030448+00:00— report_created — created