diff --git a/gb28181-wvp-proxy-service/src/main/java/cn/skcks/docking/gb28181/wvp/service/gb28181/Gb28181DownloadService.java b/gb28181-wvp-proxy-service/src/main/java/cn/skcks/docking/gb28181/wvp/service/gb28181/Gb28181DownloadService.java index 0ba4fd9..df5b2fe 100644 --- a/gb28181-wvp-proxy-service/src/main/java/cn/skcks/docking/gb28181/wvp/service/gb28181/Gb28181DownloadService.java +++ b/gb28181-wvp-proxy-service/src/main/java/cn/skcks/docking/gb28181/wvp/service/gb28181/Gb28181DownloadService.java @@ -6,6 +6,7 @@ import cn.hutool.core.date.DateUtil; import cn.hutool.core.io.IoUtil; import cn.skcks.docking.gb28181.common.json.JsonException; import cn.skcks.docking.gb28181.common.json.JsonResponse; +import cn.skcks.docking.gb28181.core.sip.gb28181.constant.GB28181Constant; import cn.skcks.docking.gb28181.core.sip.gb28181.sdp.GB28181Description; import cn.skcks.docking.gb28181.core.sip.gb28181.sdp.MediaSdpHelper; import cn.skcks.docking.gb28181.core.sip.gb28181.sdp.StreamMode; @@ -52,6 +53,7 @@ import javax.sip.message.Request; import javax.sip.message.Response; import java.nio.charset.StandardCharsets; import java.text.MessageFormat; +import java.time.ZoneId; import java.util.Date; import java.util.List; import java.util.Optional; @@ -185,8 +187,9 @@ public class Gb28181DownloadService { WvpProxyDevice device = deviceByGbDeviceIdAndChannel.get(); WvpProxyDocking docking = deviceByGbDeviceId.get(); - long start = startTime.toInstant().getEpochSecond(); - long end = endTime.toInstant().getEpochSecond(); + + long start = startTime.toInstant().atZone(ZoneId.of(GB28181Constant.TIME_ZONE)).toInstant().getEpochSecond(); + long end = endTime.toInstant().atZone(ZoneId.of(GB28181Constant.TIME_ZONE)).toInstant().getEpochSecond(); String streamId = MediaSdpHelper.getStreamId(gbDeviceId, channel, String.valueOf(start), String.valueOf(end)); int streamMode = proxySipConfig.getTransport().equalsIgnoreCase(ListeningPoint.UDP) ? 0 : 1; String ip = zlmMediaConfig.getIp();