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

ISO8601 Date Time does not require colon in time zone designators #919

Closed
kristofferpeterhansel opened this issue Sep 7, 2015 · 4 comments

Comments

@kristofferpeterhansel
Copy link

Working on handling ISO8601 date time formats in our application I have been looking a bit on how various projects handle it (mainly to see if someone else already implemented it so I didn't have to 😃)

And I noticed that while the ISO8601Utils class of Jackson supports most of it. It skips the time zone designator format without the colon.

According to the Wikipedia Page there are 4 permutations:

<time>Z
<time>±hh:mm
<time>±hhmm
<time>±hh

But as far as I can tell the implementation in Jackson only supports the first 2?

@cowtowncoder
Copy link
Member

This sounds plausible. Trying to support full variation of ISO-8601 has been a gift that keeps on giving... :)

I hope I will have time to improve this; or anyone else with time and itch.

@kristofferpeterhansel
Copy link
Author

Indeed. Turns out the Joda Time ISODateTimeFormat class appears to have a fully functional one (as least it has eaten everything I have thrown at it so far). But I suppose that is an optional dependency for Jackson. So delegating to that isn't really an option.

@cowtowncoder
Copy link
Member

Right, we want to keep core databind with minimal external dependencies.

So a fix to iso-8601 utils would be most welcome, whoever gets there first.

@cowtowncoder
Copy link
Member

Actually I think all of those should be handled. A fix was applied in 2.5.1 I think; could it be that you might be using an older version? I see the handling in utils class, as well as couple of cases of colons missing (and just using hour) in Date deserialization tests.

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

No branches or pull requests

2 participants