diff --git a/calendar/tests/rrule_manager_test.php b/calendar/tests/rrule_manager_test.php index 2c050f4e9ef..f14eb724a67 100644 --- a/calendar/tests/rrule_manager_test.php +++ b/calendar/tests/rrule_manager_test.php @@ -1024,8 +1024,8 @@ class core_calendar_rrule_manager_testcase extends advanced_testcase { public function test_yearly_september_every_two_years_forever() { global $DB; - // Change the start date for forever events to 9am on the month of September of the current year using the current day. - $this->change_event_startdate(date('Y09d\T090000')); + // Change the start date for forever events to 9am on the 2nd day of September of the current year. + $this->change_event_startdate(date('Y0902\T090000')); $rrule = "FREQ=YEARLY;BYMONTH=9;INTERVAL=2"; // Forever event. $mang = new rrule_manager($rrule); @@ -1038,7 +1038,7 @@ class core_calendar_rrule_manager_testcase extends advanced_testcase { $records = $DB->get_records('event', ['repeatid' => $this->event->id], 'timestart ASC', 'id, repeatid, timestart'); $interval = new DateInterval('P2Y'); - $expecteddate = new DateTime(date('Y09d\T090000')); + $expecteddate = new DateTime(date('Y0902\T090000')); foreach ($records as $record) { $this->assertLessThanOrEqual($untiltimestamp, $record->timestart); $this->assertEquals($expecteddate->format('Y-m-d H:i:s'), date('Y-m-d H:i:s', $record->timestart));