About Question enthuware.ocpjp.v8.2.2017 :

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

Moderator: admin

Post Reply
ramon.carrascom
Posts: 19
Joined: Sun Aug 27, 2017 12:35 pm
Contact:

About Question enthuware.ocpjp.v8.2.2017 :

Post by ramon.carrascom »

Hi,

Are OffsetDateTime and ZoneOffset in the scope of this exam?

Thank you

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

Re: About Question enthuware.ocpjp.v8.2.2017 :

Post by admin »

Officially, they are not but we have heard reports of a few candidates seeing them in the exam.
If you like our products and services, please help us by posting your review here.

floryan
Posts: 17
Joined: Sun Sep 23, 2018 4:10 am
Contact:

Re: About Question enthuware.ocpjp.v8.2.2017 :

Post by floryan »

I don't quite understand why the correct answer is "PT-1H" and not "PT1H".

The OffsetDateTime is "2017-06-02T06:00-05:00" and the ZonedDateTime is "2017-06-02T06:00-04:00".
I thought in order to calculate Duration.between, one has to count the time it takes to "get from the first to the second". If I want to go from -5 to -4 then I'd add +1. Or in other words, if clocks are one hour ahead due to summer time e.g. 2am instead of 1am, it seems more logical to me to add +1 to get from 1am to 2am.

EDIT: found an explanation here -> viewtopic.php?f=2&t=4237

lukacsa82
Posts: 1
Joined: Mon Aug 19, 2019 6:02 pm
Contact:

Re: About Question enthuware.ocpjp.v8.2.2017 :

Post by lukacsa82 »

Duration.between(date1, date2) does subtraction. In this case it means date1-date2 which is -5-(-4) = -5+4 = -1

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

Re: About Question enthuware.ocpjp.v8.2.2017 :

Post by admin »

Yes, that makes sense too.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 32 guests