You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, awesome library. Thanks for all the hard work.
I'm having an issue with the @Weekly cron tab (using both the alias and the actual cron tab of 0 0 * * 0). The issue is that it works fine for looking ahead, but not so much on looking behind.
If I do 0 0 * * 0 for now, the next date is at 2012-09-09 00:00:00, however the previous due date is 2012-03-11 00:00:00. I did some looking in the code and found that if I modify the following file:
DayOfWeekField, line 118 to: $date->setTime(0, 0, 0);
It works fine.
I'm not sure if this is actually the fix or not, or if something is weird with my machine. I ran PHPUnit on the tests (without my modification) and it came back with several errors and fails. Here is a paste bin of the test output: http://pastebin.com/s0MGpBid
Thanks!
The text was updated successfully, but these errors were encountered:
My apologies. Apparently this is an issue with the version of PHP I am running. You can find more details on the bug here: https://bugs.php.net/bug.php?id=51090
I was able to pass the unit tests by adding this code:
$datetime->sub(new DateInterval("P0D"));
Right after any add or sub method call to a date inside of any increment method. So if "sub" was called inside of increment, I added the above code after the "sub" call. Same goes for any "add" call.
First off, awesome library. Thanks for all the hard work.
I'm having an issue with the @Weekly cron tab (using both the alias and the actual cron tab of 0 0 * * 0). The issue is that it works fine for looking ahead, but not so much on looking behind.
If I do 0 0 * * 0 for now, the next date is at 2012-09-09 00:00:00, however the previous due date is 2012-03-11 00:00:00. I did some looking in the code and found that if I modify the following file:
DayOfWeekField, line 118 to: $date->setTime(0, 0, 0);
It works fine.
I'm not sure if this is actually the fix or not, or if something is weird with my machine. I ran PHPUnit on the tests (without my modification) and it came back with several errors and fails. Here is a paste bin of the test output: http://pastebin.com/s0MGpBid
Thanks!
The text was updated successfully, but these errors were encountered: