wesmiler 1 неделя назад
Родитель
Сommit
5c85580467
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      app/Console/Commands/SwooleTask.php

+ 2 - 2
app/Console/Commands/SwooleTask.php

@@ -284,8 +284,8 @@ class SwooleTask extends Command
         \swoole_timer_tick(5000, function ($timer) use ($serv, &$time) { // 启用定时器,每5秒执行一次
             $date = date('Y-m-d H:i:s');
             $updatePriceTime = ConfigService::make()->getConfigByCode('update_price_time','');
-            $updatePriceTime = $updatePriceTime? $updatePriceTime : '00:00';
-            $updatePriceTime = strtotime("Y-m-d {$updatePriceTime}");
+            $updatePriceTime = $updatePriceTime? $updatePriceTime : '00:00:00';
+            $updatePriceTime = strtotime(date("Y-m-d {$updatePriceTime}"));
             $updatePriceDate = date("Y-m-d H:i",$updatePriceTime);
             $updatePriceEndDate = date("Y-m-d H:i",$updatePriceTime+300);
             $currentTime = time();