From 1bb1eea689beeeb9cd7977418ee2e575f61d128f Mon Sep 17 00:00:00 2001 From: Charles T Date: Mon, 2 Oct 2023 09:52:13 +0800 Subject: [PATCH] Add (ai gen) --- app/Console/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 1e99ce3..5c2cc64 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -30,7 +30,7 @@ protected function schedule(Schedule $schedule) if (!is_null($nextRun)) { - $currentTime = now()->toTimeString(); + $currentTime = now()->format('H:i:00'); if ($currentTime == $nextRun->next_run_time) { @@ -52,7 +52,7 @@ protected function schedule(Schedule $schedule) { $nextRun = new DailyTaskSchedule; $nextRun->task = 'my-technology'; - $nextRun->next_run_time = now()->addMinutes(rand(0, 1440))->toTimeString(); + $nextRun->next_run_time = now()->addMinutes(rand(0, 1440))->format('H:i:00'); $nextRun->save(); } }