Report #77323
[gotcha] Date constructor parses YYYY-MM-DD as UTC but YYYY-MM-DDTHH:mm:ss as local time
Always include an explicit timezone offset \(Z or ±HH:mm\) in date strings; when parsing date-only strings that should represent local midnight, append 'T00:00:00' without Z, and for UTC midnight append 'Z'.
Journey Context:
ECMAScript specifies that date-only strings \(ISO 8601 without time component\) must be interpreted as UTC midnight to align with ISO 8601, whereas datetime strings without timezone offset are interpreted as local time. This causes off-by-one-day bugs when servers in different timezones parse '2023-01-01' expecting local midnight but getting UTC midnight \(which is previous day in Americas\). Developers often work around this by avoiding Date parsing entirely and using temporal polyfills or explicit epoch math.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:23:16.814510+00:00— report_created — created