-
-
Notifications
You must be signed in to change notification settings - Fork 125
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
RuntimeException: Impossible CRON expression at Date 2022-10-30 on Europe/Berlin Timezone #131
Comments
Thanks for this. There is some weirdness going on when switching between UTC and the assigned timezones. I'm working on fixing this, as time zone shifts cause all sorts of issues. |
I just pushed v3.2.3 which should handle this better. I'll leave this open for a bit in case there are any other issues that crop up. |
Sadly the Bug still exists with the above cron expression. I saw you fix the issue in MinutesField.php and HoursField.php. In my case though, the call comes from DayOfMonthField.php. Hope that helps. |
Gotcha. Give |
Looks good - Master works fine here :) |
same issue with the weekday field: (* * * * 2) |
Same error, but not related to timezone; rather >>> (new Cron\CronExpression('15 1 1 9,11 *'))->getNextRunDate();
=> DateTime @1662009300 {#3911
date: 2022-09-01 01:15:00.0 America/New_York (-04:00),
}
>>> (new Cron\CronExpression('15 1 1 9,11 *'))->getPreviousRunDate();
RuntimeException with message 'Impossible CRON expression' Expected: This first occurs in |
@HorstSchwarzBerlin I changed this and now seems to be working as of v3.2.4. Thanks! @lreinhard-tfb This looks like it was resolved as of at least v3.2.3. I added a regression test for it that is part of v3.2.4 so you should be good now. |
Can confirm that my case still fails in |
Closing this for now. Thanks for all the examples, and if it crops up again let me know! |
At Version Version 3.2.2 I got a RuntimeException when the Date reaches the German time change.
The following Code works fine:
but if I change the Timezone to Europe/Berlin:
I get a RuntimeException: Impossible CRON expression
Debugging from AbstractField::timezoneSafeModify:
If needed, i can pr a failing Test by tomorrow.
The text was updated successfully, but these errors were encountered: