/** * 计算两个时间相差分钟数 * @param first 发送时间 * @param second 当前时间 */ public static long getMinutes(ZonedDateTime first,ZonedDateTime second) { long secondMinutes = second.toInstant().getEpochSecond() / 60; long firstMinutes = first.toInstant().getEpochSecond() / 60; return secondMinutes - firstMinutes; }