MDL-83412 calendartype_gregorian: Use core_date

Update timestamp_to_date_string to use core_date.
This commit is contained in:
Andrew Nicols
2024-11-28 11:47:30 +08:00
committed by Jun Pataleta
parent 941d0df29e
commit 7cb2b0ca40
7 changed files with 312 additions and 39 deletions
+5 -4
View File
@@ -158,16 +158,17 @@ class provider_test extends provider_testcase {
$info = (object) reset($result);
// Ensure the correct data has been returned.
$this->assertNotEmpty($info->statedata);
$this->assertNotEmpty(transform::datetime($info->timecreated));
$this->assertNotEmpty(transform::datetime($info->timemodified));
$this->assertNotEmpty($info->timecreated);
$this->assertNotEmpty($info->timemodified);
// Get the states info for user2 in the system context.
$result = provider::get_xapi_states_for_user($user2->id, 'fake_component', $systemcontext->id);
$info = (object) reset($result);
// Ensure the correct data has been returned.
$this->assertNotEmpty($info->statedata);
$this->assertNotEmpty(transform::datetime($info->timecreated));
$this->assertNotEmpty(transform::datetime($info->timemodified));
$this->assertNotEmpty($info->timecreated);
$this->assertNotEmpty($info->timemodified);
// Get the states info for user3 in the system context (it should be empty).
$info = provider::get_xapi_states_for_user($user3->id, 'fake_component', $systemcontext->id);