-
Notifications
You must be signed in to change notification settings - Fork 95
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
Not all ISO 8601 offset formats are accepted #487
Comments
Hi @j-be , Thank you for reaching out. Unfortunately this behavior is by the spec. It is described which formatter should be used for each type if there is no formatter specified. For Date it is |
@Verdent Thanks for the feedback. I see. So following the spec the right thing to do would be to use |
After looking through it again - could it be that I (unknowingly) stumbled over a bug in Java itself here?
The same is true for |
Describe the bug
Yasson fails on offsets formatted as
+hhmm
and+hh
, even though they are considered valid ISO 8601 zone offsets (see https://en.wikipedia.org/wiki/ISO_8601#Time_zone_designators)To Reproduce
Expected behavior
Above works.
System information:
Additional context
The above examples works fine using
LocalDateTime.parse(isoDate, DateTimeFormatter.ISO_OFFSET_DATE_TIME)
.I will push a small test project to reproduce the issue shortly. Will link it here as soon as it is ready.
EDIT: Minimal project to reproduce can be found https://github.com/j-be/yasson-487
The text was updated successfully, but these errors were encountered: