About java1.8 in LocalDateTime realization date, string Huzhuan pits.

Today bored, look at the type LocalDateTime 1.8 times, when trying to turn into a string LocalDateTime time error! !

  java.time.format.DateTimeParseException: Text '2018-05-31 11:43:34.234' could not be parsed: Unable to obtain LocalDateTime from TemporalAccessor: {SecondOfMinute=34, MicroOfSecond=234000, NanoOfSecond=234000000, HourOfAmPm=11, MilliOfSecond=234, MinuteOfHour=43},ISO resolved to 2018-05-31 of type java.time.format.Parsed

 

   Looking for a long time did not find the cause, but it finally found himself in a small mistake would HH: mm: ss written in the hh: mm: ss, I lost, and finally to the, java white really sad ah!

 

Guess you like

Origin www.cnblogs.com/xiaokangk/p/10955718.html