优化国标录像服务端,使用zlm新接口实现功能

This commit is contained in:
648540858
2023-12-05 11:29:05 +08:00
parent fc77b3f819
commit ad36354ef4
14 changed files with 329 additions and 73 deletions

View File

@@ -139,4 +139,13 @@ public class DateUtil {
Instant beforeInstant = Instant.from(formatter.parse(keepaliveTime));
return ChronoUnit.MILLIS.between(beforeInstant, Instant.now());
}
public static long getDifference(String startTime, String endTime) {
if (ObjectUtils.isEmpty(startTime) || ObjectUtils.isEmpty(endTime)) {
return 0;
}
Instant startInstant = Instant.from(formatter.parse(startTime));
Instant endInstant = Instant.from(formatter.parse(endTime));
return ChronoUnit.MILLIS.between(endInstant, startInstant);
}
}