Unsupported field: YearOfEraUnsupported field: YearOfEra Date转成LocalDateTime

用Hutool工具格式化日期报错 

解决方法将Date类型 转成 LocalDateTime再格式化正常

        LocalDateTime payDateTime =LocalDateTime.ofInstant(partake.getPayTime().toInstant(), ZoneId.systemDefault());
        payedExchangedVO.setCreateAt(DateUtil.format(payDateTime,"yyyy.MM.dd HH:mm:ss"));

 

posted @ 2021-10-21 10:46  litf  阅读(4493)  评论(0)    收藏  举报