-
Notifications
You must be signed in to change notification settings - Fork 21
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
JsonDeserializer can't handle all RFC3339 timestamps #35
Comments
You are correct that we should update support here. I'll backlog an item to make this change to support the time-fraction portion of the spec. |
I've dug into the spec a bit more, and it also says that the T and Z parsing should not be case sensitive, so we possibly have another issue there, too. |
Perhaps just use PHP's native implementation for formatting timestamps? PHP RFC3339 |
Unfortunately PHP's native implementation is incorrect, and they couldn't fix it for BC reasons. |
I should be able to give us some kind of middleground here. |
https://3v4l.org/mkQKd is closer, but still not right, since the php extended constant rejects things the spec allows. The spec says you can have as many numbers as you like after the period... |
The TimeFormatter class causes error when deserializing CloudEvents. It does not accept all of the valid examples given in https://www.rfc-editor.org/rfc/rfc3339
The PHP RFC3339 implementation should probably be used instead.
Repro:
Results in:
The text was updated successfully, but these errors were encountered: