I had a code snippet that worked perfectly and now somehow does not work.
I am reading a csv file and getting an error when reading in a 4:38 format time field.
My code that throws an exception:
LocalTime.parse("4:38", DateTimeFormatter.ofPattern("HH:mm"))
I also tried "H:mm" or "H:m" for the template, but it throws the same exception: Text '4:38' could not be parsed at index 0 . Any idea why this throws an exception on the watch number?
I am using Java 8.
source share