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

fix: backward compatible support for Z UTC designator in timestamps #1127

Conversation

anto-ac
Copy link
Collaborator

@anto-ac anto-ac commented Jun 15, 2020

@uglyog what do you think about this? Perhaps a bit hacky, but at the same time there might be other organisations in a similar situation to ours.

@anto-ac anto-ac requested review from aplsup, e-ivaldi and uglyog June 15, 2020 19:25
@uglyog
Copy link
Member

uglyog commented Jun 16, 2020

Although it feels like a bad thing to do, it looks like it might be ok. It looks like ISO 8601 Time zone designation is a superset of the RFC 822 one. But maybe we should output a warning that the substitution has been made?

@anto-ac
Copy link
Collaborator Author

anto-ac commented Jun 16, 2020

Good point on the warning.

I’ve just realised that my change wouldn’t take into account formats with quotes though, and I think the parsing would fail in that case.

@uglyog
Copy link
Member

uglyog commented Jun 16, 2020

Ah, yeah, that's a problem.

I'm thinking we can add a JVM system property that turns on the behaviour. That way it is opt in.

@anto-ac
Copy link
Collaborator Author

anto-ac commented Jun 16, 2020

Or... I was thinking... a regex that substitutes only Z that are not enclosed in quotes

@anto-ac
Copy link
Collaborator Author

anto-ac commented Jun 16, 2020

@aplsup @e-ivaldi @uglyog If I could get your reviews/approvals, that would be great.

Copy link
Collaborator

@e-ivaldi e-ivaldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

@anto-ac anto-ac merged commit 64cb151 into pact-foundation:master Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants