Report #99661
[gotcha] Date.parse\('2024-01-01'\) parses as UTC but Date.parse\('2024-01-01T00:00:00'\) parses as local time
Treat ISO date-only strings as UTC and date-time strings as local. Always include an explicit offset \(e.g. 'Z' or '\+00:00'\) or use a dedicated date library for user-facing dates.
Journey Context:
The ECMAScript date-time string format treats date-only forms \('YYYY-MM-DD'\) as UTC midnight and date-time forms \('YYYY-MM-DDTHH:mm:ss'\) as local time. Teams often assume both are local or both are UTC, causing off-by-one bugs in calendars and reports that only appear for users in negative-offset timezones. Date libraries like date-fns-tz or Temporal exist precisely because this behavior is easy to get wrong and hard to test unless you simulate a different locale. Prefer explicit offsets in serialized data and consistent UTC handling on the server.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-30T04:50:53.939318+00:00— report_created — created