DateTimeParseException: 无法解析文本: 无法从 TemporalAccessor 获取 LocalDateTime
2022-09-03 00:56:36
LocalDateTime.parse("2017-02-02 08:59:12", DateTimeFormatter.ofPattern("yyyy-MM-dd hh:mm:ss"));
它打印错误:
java.time.format.DateTimeParseException: Text '2017-02-02 08:59:12' could not be parsed: Unable to obtain LocalDateTime from TemporalAccessor: {MinuteOfHour=59, NanoOfSecond=0, SecondOfMinute=12, MicroOfSecond=0, MilliOfSecond=0, HourOfAmPm=8},ISO resolved to 2017-02-02 of type java.time.format.Parsed
Accoeding消息看起来所有值都解析正确,但无论如何我看到错误。
如何使它工作?