From eabbc62adbd1e869eb563655488e514294a639c4 Mon Sep 17 00:00:00 2001 From: Fabian Helfer Date: Wed, 5 Jun 2024 09:05:55 +0200 Subject: [PATCH] Fix ForumDraftsTabel DataTable expects DateTimeImmutable Change Forum Draft Timezone to system timezone Remove Timezone from ForumDrafTable --- components/ILIAS/Forum/classes/Drafts/ForumDraftsTable.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/ILIAS/Forum/classes/Drafts/ForumDraftsTable.php b/components/ILIAS/Forum/classes/Drafts/ForumDraftsTable.php index 70e8c50e5926..c791961ae9d1 100644 --- a/components/ILIAS/Forum/classes/Drafts/ForumDraftsTable.php +++ b/components/ILIAS/Forum/classes/Drafts/ForumDraftsTable.php @@ -22,14 +22,15 @@ use Generator; use ilObjUser; -use ilDateTime; use ilLanguage; use ilObjForum; +use DateTimeZone; use ilObjForumGUI; use ilCtrlInterface; use ilForumPostDraft; use ILIAS\Data\Order; use ILIAS\Data\Range; +use DateTimeImmutable; use ILIAS\UI\URLBuilder; use ILIAS\UI\Factory as UIFactory; use ILIAS\Data\Factory as DataFactory; @@ -97,7 +98,9 @@ public function initRecords(): void } else { $this->records[$draft_id]['draft'] = $draft['subject']; } - $this->records[$draft_id]['edited_on'] = new ilDateTime($draft['post_update'], IL_CAL_DATETIME); + $this->records[$draft_id]['edited_on'] = new DateTimeImmutable( + $draft['post_update'] + ); } } }