-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
Console/Kernel timezone() and scheduleTimezone() stopped working between 8.52.0 and 8.53.0 #38283
Comments
The issue was introduced by change to The issue is happening because our Laravel app overrides the
I realized our immutable Date Factory may be causing problems when attempting to instantiate a
Proposed Fix
I'd be glad to test and submit a PR for this one-liner, if you'd like? We almost exclusively use |
@jason-klein thanks for the report. Does it fixes it for you if you use the Seems like he made the change to specifically get the behavior you were already using. |
@driesvints Glad to help. No change when attempting to use the
While using the PS - Thank you for linking to that PR! Adding a test similar to the one shown in the PR to our app so we can make sure these commands that are intended to run at local time are, indeed, running at local time instead of server time. |
This'll be in tomorrow's release. Sorry about this and thanks for reporting! |
Description:
I noticed the following change in behavior after Laravel 8.53.1 update was applied last week. I confirmed this bug is present in 8.53.1 and appears to have been introduced in Laravel Framework 8.53.0.
Console/Kernel timezone() and scheduleTimezone() stopped working between 8.52.0 and 8.53.0. Daily scheduled commands began running 5 hours earlier than expected.
Commands that would normally run at 04:00 UTC-5 (America/Chicago) were suddenly running at 23:00 UTC-5 or 04:00 UTC.
We have been using the following snippet from the Laravel 8.x scheduling docs to set a default Timezone of 'America/Chicago' for several scheduled commands that need to run at the same local time each day throughout the year.
We also tried setting timezone('America/Chicago') on the individual commands without success. Example command shown below:
I confirmed that reverting back to 8.52.0 immediately restored working functionality for Console/Kernel timezone() and scheduleTimezone(). Commands would run at specified time in local time (e.g. America/Chicago) instead of server time (e.g. UTC).
Steps To Reproduce:
The text was updated successfully, but these errors were encountered: