Skip to content

Commit

Permalink
Test: Ensure UTC on Imports
Browse files Browse the repository at this point in the history
  • Loading branch information
kergomard committed Oct 2, 2024
1 parent 414e80d commit 1558ce8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Modules/Test/classes/class.ilObjTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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');
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -4210,7 +4210,8 @@ protected function buildDateTimeImmutableFromPeriod(?string $period): ?DateTimeI
$matches[4],
$matches[5],
$matches[6]
)
),
new \DateTimeZone('UTC')
);
}
return null;
Expand Down

0 comments on commit 1558ce8

Please sign in to comment.