From d081bb2625d65fafdab25975ac46e020e30b9a27 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Tue, 29 Oct 2024 12:53:05 +0100 Subject: [PATCH] Use `DateTime::format()` instead of `DateUtil::format()` --- .../lib/system/box/TodaysBirthdaysBoxController.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/system/box/TodaysBirthdaysBoxController.class.php b/wcfsetup/install/files/lib/system/box/TodaysBirthdaysBoxController.class.php index 2373f62c17..ff94dd9799 100644 --- a/wcfsetup/install/files/lib/system/box/TodaysBirthdaysBoxController.class.php +++ b/wcfsetup/install/files/lib/system/box/TodaysBirthdaysBoxController.class.php @@ -9,7 +9,6 @@ use wcf\system\cache\runtime\UserProfileRuntimeCache; use wcf\system\condition\IObjectCondition; use wcf\system\user\UserBirthdayCache; use wcf\system\WCF; -use wcf\util\DateUtil; /** * Shows today's birthdays. @@ -88,8 +87,9 @@ class TodaysBirthdaysBoxController extends AbstractDatabaseObjectListBoxControll protected function loadContent() { // get current date - $currentDay = DateUtil::format(null, 'm-d'); - $date = \explode('-', DateUtil::format(null, 'Y-n-j')); + $now = new \DateTimeImmutable("now", WCF::getUser()->getTimeZone()); + $currentDay = $now->format('m-d'); + $date = \explode('-', $now->format('Y-n-j')); // get user ids $userIDs = UserBirthdayCache::getInstance()->getBirthdays($date[1], $date[2]); -- 2.20.1