Skip to content

Commit

Permalink
[8.x] Schedule list timezone (#37117)
Browse files Browse the repository at this point in the history
* add timezone to output

* include the schedule's timezone so that output is correct

* Update ScheduleListCommand.php

fixed styling

Co-authored-by: bilogic <email@example.com>
  • Loading branch information
bilogic and bilogic committed Apr 26, 2021
1 parent c40c8b9 commit b77e312
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Illuminate/Console/Scheduling/ScheduleListCommand.php
Expand Up @@ -37,8 +37,9 @@ public function handle(Schedule $schedule)
$event->expression,
$event->description,
(new CronExpression($event->expression))
->getNextRunDate(Carbon::now())
->setTimezone($this->option('timezone', config('app.timezone'))),
->getNextRunDate(Carbon::now()->setTimezone($event->timezone))
->setTimezone($this->option('timezone', config('app.timezone')))
->format('Y-m-d H:i:s P'),
];
}

Expand Down

0 comments on commit b77e312

Please sign in to comment.