Bläddra i källkod

有人云设备

cqpCow 2 år sedan
förälder
incheckning
c70e7d981b
2 ändrade filer med 2 tillägg och 2 borttagningar
  1. 1 1
      app/Jobs/ManDeviceJob.php
  2. 1 1
      app/Jobs/ProcessDataJob.php

+ 1 - 1
app/Jobs/ManDeviceJob.php

@@ -166,7 +166,7 @@ class ManDeviceJob implements ShouldQueue
         $currentDateTime = new \DateTime();
 
 // 设置时区为 PRC
-        $currentDateTime->setTimezone(new \DateTimeZone('Asia/Shanghai'));
+        $currentDateTime->setTimezone(new \DateTimeZone('UTC'));
 
 // 格式化时间为 "2023-09-21T16:00:00.000Z" 的格式
         $formattedDateTime = $currentDateTime->format('Y-m-d\TH:i:s.000\Z');

+ 1 - 1
app/Jobs/ProcessDataJob.php

@@ -106,7 +106,7 @@ class ProcessDataJob implements ShouldQueue
         $currentDateTime = new \DateTime();
 
 // 设置时区为 PRC
-        $currentDateTime->setTimezone(new \DateTimeZone('Asia/Shanghai'));
+        $currentDateTime->setTimezone(new \DateTimeZone('UTC'));
 
 // 格式化时间为 "2023-09-21T16:00:00.000Z" 的格式
         $formattedDateTime = $currentDateTime->format('Y-m-d\TH:i:s.000\Z');