Hello. There is such a format:
DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.A"); When trying to parse the string: '2015-12-15 09: 41: 51.0', throws an exception:
java.time.format.DateTimeParseException: Text '2015-12-15 09:41:51.0' could not be parsed: Conflict found: HourOfDay 9 differs from HourOfDay 0 while resolving SecondOfDay at java.time.format.DateTimeFormatter.createError(DateTimeFormatter.java:1920) at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1855) at java.time.LocalDateTime.parse(LocalDateTime.java:492) What could be the problem?
A - milli-of-dayProbably this is the point. It should beS - fraction-of-second, I think.yyyy-MM-dd HH:mm:ss.S- Sergey