DateTimeConverter crashes on parsing dates that have no millisecond value
roschlau opened this issue · comments
When parsing a string like "2016-06-29T12:00:00+02:00"
the DateTimeConverter will crash, because it uses ISODateTimeFormat.dateTime()
to get a formatter that explicitely expects a millisecond value. There is an alternative that explicitely doesn't excpect a millisecond value: ISODateTimeFormat.dateTimeNoMillis()
.
Both versions should be supported, as both are quite common (and valid regarding ISO 8601).
Thanks. Are you able to supply the PR?
@gkopff I think so, yeah. Any requirements, regarding code style, unit test, anything else from your part?
Just match the existing style (2 space indentation, brace position etc), and include appropriate tests please.
@gkopff Thanks for merging! Can you give an estimate when an update for the library will be available through maven?
It's Friday night here, so I probably won't get around to the mechanics of releasing until Monday. I'll post a note here once I've published it.
Much appreciated, thanks!
That's been published to Maven Central as 1.3.0
.