diff --git a/calendar/tests/rrule_manager_test.php b/calendar/tests/rrule_manager_test.php index ca285085b86..a6e2531e658 100644 --- a/calendar/tests/rrule_manager_test.php +++ b/calendar/tests/rrule_manager_test.php @@ -872,7 +872,7 @@ class core_calendar_rrule_manager_testcase extends advanced_testcase { $records = $DB->get_records('event', ['repeatid' => $this->event->id], 'timestart ASC', 'id, repeatid, timestart'); $expecteddate = new DateTime('first Monday of this month'); // Move to the next interval's first Monday if the calculated start date is after this month's first Monday. - if ($expecteddate->getTimestamp() < $startdatetime->getTimestamp()) { + if ($expecteddate->getTimestamp() < $startdate->getTimestamp()) { $expecteddate->add($interval); $expecteddate->modify('first Monday of this month'); }