"Given that daylight Savings Time starts on March 8th at 2 AM in US/Eastern time zone. (As a result, 2 AM becomes 3 AM.)"
Here we have March/08 02:00AM it means you have 03:00.
Here we have March/08 03:00AM it means you have 03:00.
Can someone explain to me why is the result of ChronoUnit.HOURS.between function here 0, considering the analogy in the
from the question viewtopic.php?f=2&t=3659?
Apparently the time in DST start (March) is moved ahead to 3 AM in contrast with DST end time (November) which is not moved back to 1 AM, or I misunderstood something?
Code: Select all
LocalDateTime ld1 = LocalDateTime.of(2015, Month.NOVEMBER, 1, 2, 0); // 2015-11-01T02:00
ZonedDateTime zd1 = ZonedDateTime.of(ld1, ZoneId.of("US/Eastern")); // 2015-11-01T02:00-05:00[US/Eastern
LocalDateTime lod1 = LocalDateTime.of(2015, Month.MARCH, 8, 2, 0); // 2015-03-08T02:00
ZonedDateTime zod1 = ZonedDateTime.of(lod1, ZoneId.of("US/Eastern")); // 2015-03-08T03:00-04:00[US/Eastern]