Skip to content

Commit

Permalink
add timezone option
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Dec 11, 2020
1 parent 3406033 commit 97d7834
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Illuminate/Console/Scheduling/ScheduleListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -36,16 +36,16 @@ 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'))),
];
}

$this->table([
'Command',
'Interval',
'Description',
'Last Run',
'Next Due',
], $rows ?? []);
}
Expand Down

0 comments on commit 97d7834

Please sign in to comment.