java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: ClockHourOfAmPm

今天在学设计模式,发现这个报错,百度一下,发现没有。记一下。

我的问题是因为我用

LocalDate.now()//生成了日期对象,我却用有时间的格式话对象去处理,所以会报这个错。
LocalDate.now().format(pattern_)
DateTimeFormatter pattern_ = DateTimeFormatter.ofPattern("yyyy-MM-dd hh:mm:ss");

 


加油,愿被这世界温柔以待 ^_^
原文地址:https://www.cnblogs.com/liruilong/p/14800608.html