Closed robin-xyzt-ai closed 2 years ago
It looks like it is the same problem as in issue#8 see this comment The problem is in parseDate(input) method, that wrongly apply a local DST(Daylight saving time) for parsed date with time zone information. The result will be parsed correctly if you use Date.from(parser.toOffsetDateTime().toInstant()); But this workaround will work only if you know in advance that a time zone information is present in parsed string. I think this problem will be fixed soon. I will submit a new pull request to @sisyphsu soon
Good catch, I overlooked that issue
Great thanks to @andriy-samson , the new pull request has been merged into 1.0.8
version~
Thanks. I used the new version and the issue seems indeed to be fixed.
fails.
The input should parse to (as the JDK code does):
But you get
The ISO timestamp is expressed in GMT. CEST is Central Europe Summer Time and is GMT+2. So 09:20 in GMT becomes 11:20 CEST. To me it looks like the JDK code is correct, and this parser is 1 hour off.
This was tested with OpenJDK11, with
Locale.getDefault(Locale.Category.FORMAT)
:en_US
TimeZone.getDefault()
:id="Europe/Brussels"