From 1558ce8c37fcd96bad6c726da0f506324d183145 Mon Sep 17 00:00:00 2001 From: Stephan Kergomard Date: Wed, 2 Oct 2024 10:29:34 +0200 Subject: [PATCH] Test: Ensure UTC on Imports --- Modules/Test/classes/class.ilObjTest.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Modules/Test/classes/class.ilObjTest.php b/Modules/Test/classes/class.ilObjTest.php index 17478d619e39..33a107ab7146 100755 --- a/Modules/Test/classes/class.ilObjTest.php +++ b/Modules/Test/classes/class.ilObjTest.php @@ -1452,7 +1452,7 @@ public function &getQuestionTitlesAndIndexes(): array */ public function getQuestionTitle($title, $nr = null, $points = null): string { - switch($this->getTitleOutput()) { + switch ($this->getTitleOutput()) { case '0': case '1': return $title; @@ -1469,7 +1469,7 @@ public function getQuestionTitle($title, $nr = null, $points = null): string } else { $txt = $this->lng->txt("ass_question"); } - if($points != '') { + if ($points != '') { $lngv = $this->lng->txt('points'); if ($points == 1) { $lngv = $this->lng->txt('point'); @@ -3787,7 +3787,7 @@ public function toXML(): string $a_xml_writer->xmlStartTag("qtimetadatafield"); $a_xml_writer->xmlElement("fieldlabel", null, "reporting_date"); $reporting_date = $this->buildPeriodFromFormatedDateString( - $this->getScoreSettings()->getResultSummarySettings()->getReportingDate()->format('Y-m-d H:m:s') + $this->getScoreSettings()->getResultSummarySettings()->getReportingDate()->format('Y-m-d H:i:s') ); $a_xml_writer->xmlElement("fieldentry", null, $reporting_date); $a_xml_writer->xmlEndTag("qtimetadatafield"); @@ -4210,7 +4210,8 @@ protected function buildDateTimeImmutableFromPeriod(?string $period): ?DateTimeI $matches[4], $matches[5], $matches[6] - ) + ), + new \DateTimeZone('UTC') ); } return null;