Given that daylight savings time starts on March 12, 2017, at 2 a.m. and clocks jump from 1:59 a.m. to 03:00 a.m.,
which of the following can fill in the blank so the code doesn't throw an exception?
LocalDate localDate = LocalDate.of(2017, 3, 12);
LocalTime localTime = LocalTime.of( );
ZoneId zone = ZoneId.of("America/New_York");
ZonedDateTime z = ZonedDateTime.of(localDate, localTime, zone);
C.
While there is no 2 a.m. on the clock that night, Java adjusts the time to 3 a.m. automatically and changes the time zone.
It does not throw an exception, so Option D is incorrect.
Option B is a valid expression, since any value after the time adjustment is just a normal time on the clock.
Since both A and B are valid expressions, Option C is the correct answer.