From: Cyperghost Date: Tue, 29 Oct 2024 11:53:05 +0000 (+0100) Subject: Use `DateTime::format()` instead of `DateUtil::format()` X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d081bb2625d65fafdab25975ac46e020e30b9a27;p=GitHub%2FWoltLab%2FWCF.git Use `DateTime::format()` instead of `DateUtil::format()` --- 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]);