Open eirikmik opened 7 years ago
Isnt that the expected behaviour though? The cron is not valid if the time doesnt exist?
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.
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.
If the result of getPreviousRunDate happens to be within the "missing" hour during DST change, an "Impossible CRON expression" error is thrown.