From 9b703fb40f2c8d0fe08c15a08d9f919a9cee7fa3 Mon Sep 17 00:00:00 2001 From: Fallen_Breath Date: Sun, 9 Nov 2025 14:32:06 +0800 Subject: [PATCH] fix: timezone issue in `Schedule::getNextRunDate` (#5381) --- app/Models/Schedule.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/Models/Schedule.php b/app/Models/Schedule.php index 2d85314f0..3124b7887 100644 --- a/app/Models/Schedule.php +++ b/app/Models/Schedule.php @@ -120,9 +120,7 @@ class Schedule extends Model { $formatted = sprintf('%s %s %s %s %s', $this->cron_minute, $this->cron_hour, $this->cron_day_of_month, $this->cron_month, $this->cron_day_of_week); - return CarbonImmutable::createFromTimestamp( - (new CronExpression($formatted))->getNextRunDate()->getTimestamp() - ); + return CarbonImmutable::instance((new CronExpression($formatted))->getNextRunDate()); } /**