GetNextOccurrence doesn't return the correct next occurence
MaznasPetros opened this issue · comments
Here is an example of getting wrong values.
Expression: */30 * 23,0,1,2 * * 1-5
Running time: Thursday,14:40:25
GetNextOccurrence returns: Thurday, 23:00:30 (while this should be Thursday, 23:00:00)
In the previous example, I get the correct next occurence if the running time is different
Expression: */30 * 23,0,1,2 * * 1-5
Running time: Thursday,14:40:40
GetNextOccurrence returns: Thurday, 23:00:00 (correct!)
I dont have the same issue when setting up the expression like */30 * 23,0,1,2 * * 0,6 and running it through the weekdays (e.g. Thursday)
Expression: */30 * 23,0,1,2 * * 0,6
Running time: Thursday,14:40:40 OR Thursday,14:40:10
GetNextOccurrence returns: Saturday, 24:00:00 (correct!)
Basically, based on the current second tick it calculates the next occurence second while not respecting the hours or days before calculating the seconds.
The bug fix is now available in release 3.3.3.
Thanks for the quick response @atifaziz and thank you for the release ;)