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

If result of getNextRunDate / getPreviousRunDate happens to be during DST change window, exception is thrown #149

Open
eirikmik opened this issue Mar 27, 2017 · 3 comments

Comments

@eirikmik
Copy link

If the result of getPreviousRunDate happens to be within the "missing" hour during DST change, an "Impossible CRON expression" error is thrown.

@laurencei
Copy link
Contributor

Isnt that the expected behaviour though? The cron is not valid if the time doesnt exist?

@eirikmik
Copy link
Author

The expected behaviour is to return a valid timestamp. Consider a cron string like "45 */3 * * *" (which is the actual case which triggered the bug). I'm not asking for a time which does not exist, I'm asking for the previous run date and expect cron-expression to figure this out, not fail because it tries to instantiate an invalid DateTime.

@dragonmantank
Copy link
Collaborator

dragonmantank commented Apr 2, 2017

I'm trying to get a handle on this, and #148.

What time did the error occur? I've been testing various times on the current master branch and it seems to be returning the expected run times, properly hopping across the DST time switches.

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

No branches or pull requests

3 participants