Stephan van Hulst wrote:You need to tell us what part of the explanation is not clear to you, and explain to us why you think it is 0.
Stephan, the lines of codes are as follows with my explanation . Correct me if i am wrong
LocalDateTime ld1 = LocalDateTime.of(2015, Month.NOVEMBER, 1, 2, 0); // This line of code is having a time of 2 AM so as per DST savings, it should become 1 AM
ZonedDateTime zd1 = ZonedDateTime.of(ld1, ZoneId.of("US/Eastern"));
LocalDateTime ld2 = LocalDateTime.of(2015, Month.NOVEMBER, 1, 1, 0);// There wont be any change of time as the time is still 1 AM and time changes after 2 AM
ZonedDateTime zd2 = ZonedDateTime.of(ld2, ZoneId.of("US/Eastern"));// As both the times are 1 AM , the result is zero.
Thanks & Regards,
Swapna.