Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] Schedule list timezone #37117

Merged
merged 3 commits into from Apr 26, 2021
Merged

[8.x] Schedule list timezone #37117

merged 3 commits into from Apr 26, 2021

Conversation

bilogic
Copy link
Contributor

@bilogic bilogic commented Apr 25, 2021

I needed the timezone output as some of my schedules utilized ->timezone()
Also fixed an issue where the next due was incorrect.

@GrahamCampbell GrahamCampbell changed the title Schedule list timezone [8.x] Schedule list timezone Apr 26, 2021
->getNextRunDate(Carbon::now())
->setTimezone($this->option('timezone', config('app.timezone'))),
->getNextRunDate(Carbon::now()->setTimezone($event->timezone))
->setTimezone($this->option('timezone', config('app.timezone')))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't have this foundation config function call.

Copy link
Contributor Author

@bilogic bilogic Apr 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean config('app.timezone')? It was originally there.

Pros: all timezones are based on option/Laravel's .env
Cons: the timezone displayed on output may not be the same as coded, i.e. coded as 0:00 GMT+0, but displayed as 1:00 GMT+1.

My personal preference is to have output displayed as coded.

Actually, I have my own personal schedule:list, I could PR this too if it is welcomed. It has this diffForHumans() and English translation of cron, which helps quite a bit.

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GrahamCampbell for command's it's okay since they only work with the base foundation anyway.

@taylorotwell taylorotwell merged commit b77e312 into laravel:8.x Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants