LocalDate nowLocalDate = LocalDate.now();
Date date = Date.from(nowLocalDate.atStartOfDay(ZoneOffset.ofHours(8)).toInstant());
       

 

 

 

Date 转 LocalDate

Date startDate=new Date();
LocalDate localDate =startDate.toInstant()
                    .atZone(ZoneId.systemDefault())
                    .toLocalDate();

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-30
  • 2021-09-27
  • 2022-01-19
  • 2021-07-25
  • 2022-02-18
  • 2022-01-24
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-28
  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案