[HD-OCP17/21-Fundamentals Pg 0, Sec. 22.7.0 - quiz]

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
joaoclopes
Posts: 35
Joined: Mon Sep 23, 2024 4:49 pm
Contact:

[HD-OCP17/21-Fundamentals Pg 0, Sec. 22.7.0 - quiz]

Post by joaoclopes »

Hello,

There is a typo on the calculated date on Q1:

Code: Select all

z3 is 2024/7/1 14:30:30Zand z4 is 2024/7/1 04:30:30Z.
z4 should be 2024/7/1 05:10:30Z because 10:40:30 - (+5:30) is 05:10:30

Thanks!

admin
Site Admin
Posts: 10384
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: [HD-OCP17/21-Fundamentals Pg 0, Sec. 22.7.0 - quiz]

Post by admin »

Your are right. The explanation has been updated to:
To compare them, you need to translate these times into a common UTC time. Since NYC is 4 hours behind UTC, you have to add 4 to NYC time to get UTC time and since Calcutta is 5:30 hours ahead of UTC, you have to subtract 5:30 to get UTC time. (Note that in terms of "offset" values, the offset for NYC is minus 4 and the offset for Calcutta is plus 5:30). Thus, z3 can be computed as 10:30+4 i.e. 14:30, and so z3 is 2024/7/1 14:30Z and z4 is 2024/7/1 05:00Z (10:30-5:30). Since 14:30 is after 5:00, z3.isAfter(z4) will return true.

joaoclopes
Posts: 35
Joined: Mon Sep 23, 2024 4:49 pm
Contact:

Re: [HD-OCP17/21-Fundamentals Pg 0, Sec. 22.7.0 - quiz]

Post by joaoclopes »

Glad that I could help!

Sophia2005
Posts: 1
Joined: Fri May 09, 2025 1:38 am
Contact:

Re: [HD-OCP17/21-Fundamentals Pg 0, Sec. 22.7.0 - quiz]

Post by Sophia2005 »

Oh. I didn't notice that mistake. You are so perceptive.
Monkey Mart Game

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests