Skip to content

Tag: java.time.instant

Parse string with offset to Instant Java 11

I am trying to parse the following string 2021-10-15T08:39:05+02:00 into an Instant this works seamlessly using Java 15 but throws an error for Java 11. java.time.format.DateTimeParseException: Text ‘2021-10-19T11:06:35+02:00’ could not be parsed at index 19 Why is that the case? Edit: Java 15 Ans…