648540858
2023-10-12 298a9f4280458062ed0fc32084d5bcce8bbf196c
src/main/java/com/genersoft/iot/vmp/utils/DateUtil.java
old mode 100644 new mode 100755
@@ -1,6 +1,8 @@
package com.genersoft.iot.vmp.utils;
import org.apache.commons.lang3.ObjectUtils;
import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
@@ -109,6 +111,9 @@
    }
    public static long getDifferenceForNow(String keepaliveTime) {
        if (ObjectUtils.isEmpty(keepaliveTime)) {
            return 0;
        }
        Instant beforeInstant = Instant.from(formatter.parse(keepaliveTime));
        return ChronoUnit.MILLIS.between(beforeInstant, Instant.now());
    }