I got the following exception while parsing an XML file with dates
org.joda.time.IllegalInstantException: Cannot parse "2017-03-12 02:00:00": Illegal instant due to time zone offset transition (America/Chicago)
org.joda.time.IllegalInstantException: Cannot parse "2017-03-12 02:00:00": Illegal instant due to time zone offset transition (America/Chicago)
The time went from 1:59:59 to 3:00:00 – there's no 2, hence the exception.
You should use UTC instead of local time to avoid this kind of time zone issue.
No comments:
Post a Comment