eclipse-ee4j / eclipse-ee4j/yasson
Not all ISO 8601 offset formats are accepted
- Dominant language
- Java
- Stars
- 218
- Forks
- 109
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 9
Description
**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**
```java
JsonbBuilder.create().fromJson("\"2021-04-26T16:14:44.538+0000\"", Date.class);
JsonbBuilder.create().fromJson("\"2021-04-26T16:14:44.538+00\"", Date.class);
```
**Expected behavior**
Above works.
**System information:**
- OS: Linux Mint 20
- Java Version: AdoptOpenJDK (build 11.0.10+9)
- Yasson Version: 2.0.2
**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
Contributor guide
Assessment
This issue has not been assessed yet.