diff --git a/components/ILIAS/Forum/classes/Drafts/ForumDraftsTable.php b/components/ILIAS/Forum/classes/Drafts/ForumDraftsTable.php index c791961ae9d1..2a17815c5456 100644 --- a/components/ILIAS/Forum/classes/Drafts/ForumDraftsTable.php +++ b/components/ILIAS/Forum/classes/Drafts/ForumDraftsTable.php @@ -24,13 +24,13 @@ use ilObjUser; use ilLanguage; use ilObjForum; -use DateTimeZone; use ilObjForumGUI; use ilCtrlInterface; use ilForumPostDraft; use ILIAS\Data\Order; use ILIAS\Data\Range; use DateTimeImmutable; +use ilCalendarSettings; use ILIAS\UI\URLBuilder; use ILIAS\UI\Factory as UIFactory; use ILIAS\Data\Factory as DataFactory; @@ -178,13 +178,19 @@ private function limitRecords(array $records, Range $range): array */ private function getColumns(): array { + if ((int) $this->user->getTimeFormat() === ilCalendarSettings::TIME_FORMAT_12) { + $format = $this->data_factory->dateFormat()->withTime12($this->user->getDateFormat()); + } else { + $format = $this->data_factory->dateFormat()->withTime24($this->user->getDateFormat()); + } + return [ 'draft' => $this->ui_factory->table()->column()->link($this->lng->txt('drafts'))->withIsSortable( false )->withIsSortable(false), 'edited_on' => $this->ui_factory->table()->column()->date( $this->lng->txt('edited_on'), - $this->data_factory->dateFormat()->germanLong() + $format )->withIsSortable(false) ]; }