diff --git a/lib/tests/cronlib_test.php b/lib/tests/cronlib_test.php index 66b33a99dcd..47ee55cd736 100644 --- a/lib/tests/cronlib_test.php +++ b/lib/tests/cronlib_test.php @@ -43,7 +43,7 @@ class cronlib_testcase extends basic_testcase { $time = 0; // Relative time stamps. Did you know data providers get executed during phpunit init? - $lastweekstime = strtotime('-1 week') - time(); + $lastweekstime = -($CFG->tempdatafoldercleanup * 3600); // This must match file_temp_cleanup_task. $beforelastweekstime = $lastweekstime - 3600 - 1; // At least 1h and 1s diff (make it DST immune). $afterlastweekstime = $lastweekstime + 3600 + 1; // At least 1h and 1s diff (make it DST immune).