1z0-829 Exam QuestionsBrowse all questions from this exam

1z0-829 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?

Show Answer
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

7 comments
Sign in to comment
gavishnuOption: C
Jan 16, 2024

true, false

james2033Option: C
Feb 11, 2024

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

SampsOption: C
Feb 7, 2024

C. true, false

SampsOption: C
Feb 7, 2024

C. true, false

minhdevOption: C
May 5, 2024

C is correct answer

minhdev
May 5, 2024

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

xplorerpjOption: C
Jun 15, 2024

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

UtemanOption: C
Jul 2, 2024

C is the correct answer