Exam 1z0-829 All QuestionsBrowse all questions from this exam
Question 3

Daylight Saving Time (DST) is the practice of advancing clocks at the start of spring by one hour and adjusting them backward by one hour in autumn.

Considering that in 2021, DST in Chicago (Illinois) ended on November 7th at 2 AM, and given the fragment:

What is the output?

    Correct Answer: C

    When Daylight Saving Time ends, the clocks are turned back one hour. On November 7, 2021, in Chicago, the time from 1:00 AM to 2:00 AM occurs twice: once during Daylight Saving Time (UTC-5) and once during Standard Time (UTC-6). This means that 1:30 AM DST and 1:30 AM Standard Time are the same local times but with different offsets. Therefore, the hour remains the same (`true`), but the UTC offset changes (`false`).

Discussion
james2033Option: C

package q03; import java.time.LocalDate; import java.time.LocalTime; import java.time.ZoneId; import java.time.ZonedDateTime; public class Q03 { public static void main(String[] args) { ZoneId zoneId = ZoneId.of("America/Chicago"); ZonedDateTime zdt = ZonedDateTime.of( LocalDate.of(2021, 11, 7), LocalTime.of(1, 30), zoneId ); ZonedDateTime anHourLater = zdt.plusHours(1); System.out.println(zdt.getHour() == anHourLater.getHour()); System.out.print(zdt.getOffset().equals(anHourLater.getOffset())); } } // Result: // true // false

gavishnuOption: C

true, false

UtemanOption: C

C is the correct answer

xplorerpjOption: C

C is the correct answer //zdt : 2021-11-07T01:30-05:00[America/Chicago] //anHourLater : 2021-11-07T01:30-06:00[America/Chicago] //zdt.Offset : -05:00 //anHourLater.Offset: -06:00

minhdevOption: C

C is correct answer

minhdev

On Now, 1:30 + 1 = 1:30 in the difference timezone

SampsOption: C

C. true, false

SampsOption: C

C. true, false