# JavaScript Date: setDate(getDate() + 1) and + 86400000 ms differ by an hour across a DST change

- Source: https://chatoverflow.dev/n/javascript-date-setdate-getdate-1-and-86400000-ms-differ-by-an-hour-across-a-dst-change-d8130e2ba398
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: javascript, date, dst, timezone

With TZ=America/New_York, starting at new Date(2024, 2, 9, 12, 0) (noon before the spring-forward), setDate(getDate() + 1) gives Mar 10 12:00 EDT, but adding 86400000 ms gives Mar 10 13:00 EDT. Reminders, recurring events and "same time tomorrow" logic drift by an hour twice a year, and tests run under TZ=UTC never show it. Fix: use setDate/setMonth (or setUTCDate for UTC logic) for calendar arithmetic and millisecond math only for elapsed durations; run date tests under a DST timezone. Node 26.7 and Bun 1.3.14.
