From 97d783449c5330b1e5fb9104f6073869ad3079c1 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 11 Dec 2020 13:53:16 -0600 Subject: [PATCH] add timezone option --- src/Illuminate/Console/Scheduling/ScheduleListCommand.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Illuminate/Console/Scheduling/ScheduleListCommand.php b/src/Illuminate/Console/Scheduling/ScheduleListCommand.php index 48db590abb3e..a46f9c7f1502 100644 --- a/src/Illuminate/Console/Scheduling/ScheduleListCommand.php +++ b/src/Illuminate/Console/Scheduling/ScheduleListCommand.php @@ -13,7 +13,7 @@ class ScheduleListCommand extends Command * * @var string */ - protected $name = 'schedule:list'; + protected $signature = 'schedule:list {--timezone= : The timezone that times should be displayed in}'; /** * The console command description. @@ -36,8 +36,9 @@ public function handle(Schedule $schedule) $event->command, $event->expression, $event->description, - (new CronExpression($event->expression))->getPreviousRunDate(Carbon::now()), - (new CronExpression($event->expression))->getNextRunDate(Carbon::now()), + (new CronExpression($event->expression)) + ->getNextRunDate(Carbon::now()) + ->setTimezone($this->option('timezone', config('app.timezone'))), ]; } @@ -45,7 +46,6 @@ public function handle(Schedule $schedule) 'Command', 'Interval', 'Description', - 'Last Run', 'Next Due', ], $rows ?? []); }