Page 1 of 1
[HD-OCP17/21-Fundamentals Pg 0, Sec. 22.7.0 - quiz]
Posted: Sat Mar 08, 2025 3:12 pm
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!
Re: [HD-OCP17/21-Fundamentals Pg 0, Sec. 22.7.0 - quiz]
Posted: Sat Mar 08, 2025 11:31 pm
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.
Re: [HD-OCP17/21-Fundamentals Pg 0, Sec. 22.7.0 - quiz]
Posted: Mon Mar 10, 2025 1:57 pm
by joaoclopes
Glad that I could help!
Re: [HD-OCP17/21-Fundamentals Pg 0, Sec. 22.7.0 - quiz]
Posted: Fri May 09, 2025 1:44 am
by Sophia2005
Oh. I didn't notice that mistake. You are so perceptive.
Monkey Mart Game