New York switched from Eastern Standard Time to Eastern Daylight Time on March 10th, 2024.
I believe the time zone ID "Eastern Standard Time" maps to "America/New_York" in .NET.
However, when I cound the number of hours on March 10th, 2024 using this timezone, I see 24 hours and not 23 hours (since clocks moved forward 1 hour at 2am).
(This snippet uses F#, but a C# solution would obviously work too.)
open Systemlet est = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time")let start = DateTimeOffset(DateTime(2024, 3, 10, 0, 0, 0, DateTimeKind.Unspecified), est.BaseUtcOffset)let stop = DateTimeOffset(DateTime(2024, 3, 11, 0, 0, 0, DateTimeKind.Unspecified), est.BaseUtcOffset)(stop - start).TotalHours# 24.0