ZonedDateTime zdt = ZonedDateTime.now(ZoneOffset.UTC);
        int now15Minute = zdt.getMinute() / P15MINUTE * P15MINUTE;
     //instant当前时刻的下一个15分钟时间点 Instant instant
= ZonedDateTime .of(zdt.getYear(), zdt.getMonthValue(), zdt.getDayOfMonth(), zdt.getHour(), now15Minute, 0, 0, ZoneOffset.UTC) .toInstant().plus(Duration.ofMinutes(P15MINUTE));

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-29
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-20
  • 2022-12-23
  • 2022-12-23
  • 2021-08-06
  • 2022-12-23
  • 2021-12-04
  • 2021-04-28
相关资源
相似解决方案