- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 422
switch from joda.time to java.time #1746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Depends on steve-community/ocpp-jaxb#16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@goekay Please review and give feedbacks :)
<artifactId>ocpp-jaxb</artifactId> | ||
<version>0.0.9</version> | ||
<version>feature~java-time-a74e2a0636-1</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to be replaced before merge
@@ -191,9 +191,9 @@ public void test8() throws Exception { | |||
.andExpect(jsonPath("$[0].chargeBoxId").value("cb-2")) | |||
.andExpect(jsonPath("$[0].ocppIdTag").value("id-3")) | |||
.andExpect(jsonPath("$[0].ocppIdTag").value("id-3")) | |||
.andExpect(jsonPath("$[0].startTimestamp").value(start.toString())) | |||
.andExpect(jsonPath("$[0].startTimestamp").value("2022-10-01T00:00:00Z")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't know if it is a issue from the test or the implementation
@@ -175,7 +175,7 @@ public void test5() throws Exception { | |||
.andExpect(jsonPath("$[0].parentIdTag").value("parent-id-1")) | |||
.andExpect(jsonPath("$[0].inTransaction").value("false")) | |||
.andExpect(jsonPath("$[0].blocked").value("true")) | |||
.andExpect(jsonPath("$[0].expiryDate").value("2020-10-01T00:00:00.000Z")) | |||
.andExpect(jsonPath("$[0].expiryDate").value("2020-10-01T00:00:00")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't know if it is a issue from the test or the implementation
if (ldt == null) { | ||
return null; | ||
} else { | ||
return ldt.toDateTime(); | ||
return ldt.atOffset(ZoneOffset.UTC); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When possible, I think the offset should be taken from the location of the station
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to #96
17ae9e7
to
bd04b78
Compare
i considered this years ago but then dismissed the topic, because of the following... joda's DateTime is forgiving if the timezone designator is missing. timezone designator is a MUST for java's data types. you can imagine joda's DateTime as a union of multiple possible date-time types in |
test code:
|
You are right, but the issue doesn't exist because already treated. See https://github.com/steve-community/ocpp-jaxb/pull/16/files#r2026501536 |
Close steve-community#98
bd04b78
to
1a37545
Compare
Neat! Let's continue the conversation there. |
Close #98