The UTC offset changes between midnights
NIST lists March 8 and November 1 as the U.S. daylight saving transition dates for 2026. In America/New_York, midnight March 8 (-05:00) to midnight March 9 (-04:00) spans 23 hours; midnight November 1 (-04:00) to midnight November 2 (-05:00) spans 25 hours. Each pair is 1 calendar day apart. These examples apply to this region’s one-hour transitions.
Keep offsets when calculating elapsed time
The JavaScript below interprets each instant with its explicit offset and divides the millisecond difference by 3,600,000. The results are 23 and 25. Do not remove the offsets or replace a calendar date difference by dividing elapsed hours by 24 and rounding. A fixed offset alone does not encode a region’s future transition rules.
Moyoutil’s date calculator treats YYYY-MM-DD as UTC midnight. Both examples return 1 with the include-end-date option off. It does not calculate regional elapsed time. The code below is a separate JavaScript example.
const hours = (start, end) =>
(Date.parse(end) - Date.parse(start)) / 3600000;
console.log(hours(
'2026-03-08T00:00:00-05:00',
'2026-03-09T00:00:00-04:00')); // 23
console.log(hours(
'2026-11-01T00:00:00-04:00',
'2026-11-02T00:00:00-05:00')); // 25Frequently Asked Questions
Is every day in a daylight saving region 23 or 25 hours long?
No. These examples cover two transition dates in New York. Do not apply their results to other dates or regions. Actual elapsed time requires the intended region and a valid offset for each instant.