Skip to content
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

StatusNotification - Timestamp invalid format #5

Open
rustik666 opened this issue Apr 26, 2024 · 7 comments
Open

StatusNotification - Timestamp invalid format #5

rustik666 opened this issue Apr 26, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@rustik666
Copy link

StatusNotification- Timestamp invalid format

Details

We recieve the next paylod for StatusNotification

[2,"658ae207-02ad-4051-8ecb-51d90e8bbf21","StatusNotification",{"connectorId":2,"errorCode":"NoError","status":"Preparing","timestamp":"2024-04-26T14:35:02+02"}]

2024-04-26T14:35:02+02 isn't valid RFC3339 format which we would expect to receive according to OCPP specification.

@BrianEstrada
Copy link
Contributor

Hey thanks for the report @rustik666 sorry for the long response time, I'll take a look into this now

@BrianEstrada BrianEstrada self-assigned this Aug 15, 2024
@BrianEstrada BrianEstrada added the bug Something isn't working label Aug 15, 2024
@BrianEstrada
Copy link
Contributor

@rustik666 I wasn't able to find anywhere in the documentation a mention of RFC3339

image

I only found this section which mentions ISO 8601 which is what we are following right now

@nick-jones
Copy link

nick-jones commented Sep 4, 2024

Implementations MUST use ISO 8601 date time notation. Message receivers must be able to handle fractional seconds and time zone offsets (another implementation might use them).

Unfortunately this is at odds with the published JSON schema, as the date-time format is specified in many places, and JSON schema requires this to be RFC 3339 - https://json-schema.org/draft-04/draft-fge-json-schema-validation-00#rfc.section.7.3.1

@BrianEstrada
Copy link
Contributor

@nick-jones I'll see if I can reach out to some people at the OCA to see why the discrepancy but in our experience as a CPMS many charge points are sending values to us using Offsets

@nick-jones
Copy link

nick-jones commented Sep 5, 2024

@BrianEstrada That's been our experience too. That said, we've had quite a number of cases where charge points have been non-compliant to the schema in other ways, so I wouldn't necessarily use that as a notion of correctness. The OCPP 2.0.1 and 2.1 draft specs now state:

All time values exchanged between CSMS and Charging Station SHALL be formatted as defined in [RFC3339].

... so I think it's fair to assume this was understood to be an issue and corrected.

This isn't really a hill to die on, but yeah, the main problem with not using RFC 3339 here is that any CSMS that decides to validate payloads against the published schema are going to end up rejecting these messages from the emulator.

I'd be interested to hear what the OCA opinion is on this 👍

@BrianEstrada
Copy link
Contributor

@nick-jones some nice insights thank you for sharing 😃 I think this is enough to convince me to change it in the emulator but I'll still bring it up at the OCA and report back here

@Trevodorax
Copy link

Hi ! Any news on this ?

I am facing this issue right now, and it also happens in the StartTransaction request.

I could offer a fix, if I did would it get accepted ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants