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));
Thanks,
Ivan