I am trying to parse date string with format "HHmmssZ",
OffsetTime.parse("115601Z", DateTimeFormatter.ofPattern("HHmmssZ")).toLocalTime()
when i test it i get the exception :
java.time.format.DateTimeParseException: Text '112322Z' could not be parsed at index 6
at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1949)
at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1851)
at java.time.OffsetTime.parse(OffsetTime.java:327)
See Question&Answers more detail:os