Report #5287
[gotcha] Date.parse treats date-only ISO strings as UTC but date-time strings as local time when timezone is omitted
Always include explicit timezone indicators: use \`Z\` suffix for UTC \(\`2023-01-01T00:00:00Z\`\) or explicit offset \(\`-05:00\`\). For date-only UTC midnight, use the date-only form \(\`2023-01-01\`\); for local midnight, use \`new Date\(year, month, day\)\` \(month is 0-indexed\).
Journey Context:
Per ECMA-262, the Date Time String Format distinguishes between "date-only" forms \(interpreted as UTC midnight\) and "date-time" forms without timezone offset \(interpreted as local time\). This causes off-by-one-day bugs for developers in negative UTC offsets \(e.g., US timezones\) when parsing \`2023-01-01T00:00:00\` expecting midnight UTC but getting midnight local \(which is hours earlier\). The ambiguity is resolved by always specifying \`Z\` for UTC or explicit offsets.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T20:58:42.038798+00:00— report_created — created