I want to parse the following time string to java.time
:
OffsetDateTime.parse("00:00:00.000+02:00", DateTimeFormatter.ISO_OFFSET_TIME);
Result:
java.time.format.DateTimeParseException: Text '00:00:00.000+02:00' could not be parsed: Unable to obtain OffsetDateTime from TemporalAccessor: {OffsetSeconds=7200},ISO resolved to 00:00 of type java.time.format.Parsed
at java.time.format.DateTimeFormatter.createError(DateTimeFormatter.java:1918)
at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1853)
at java.time.OffsetDateTime.parse(OffsetDateTime.java:402)
So how could I then parse this time, if not this way?