Page 1 of 1

About Question enthuware.ocpjp.v17.2.3791 :

Posted: Tue May 31, 2022 12:16 pm
by kaleemkhan.java
Answer to this question is 0.

but enthuware option tells as -1.

Attached screen shot.

Re: About Question enthuware.ocpjp.v17.2.3791 :

Posted: Tue May 31, 2022 8:30 pm
by admin
Actually, the answer needs to be as per the situation given in the question. The problem statement says that the daylight Savings Time ends on Nov 6th 2021 at 2 AM in US/Eastern time zone. Assuming this to be true, the answer will be -1.

Your program doesn't print -1 because DST didn't actually end on Nov 6th in 2021. In 2021, DST ended on Nov 7th. That is why you see 0. If you change the year to 2022 (or the date to 7), you will see -1.