fix: timezone issue in Schedule::getNextRunDate (#5381)

This commit is contained in:
Fallen_Breath 2025-11-09 14:32:06 +08:00 committed by GitHub
parent 01fd763fe9
commit 9b703fb40f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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());
}
/**