From b2204e3d38abff27dd16754cb65f302cf51dabac Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 3 Jan 2017 00:46:26 +0100 Subject: [PATCH] Fixed incorrect timezone calculation --- wcfsetup/install/files/lib/util/DateUtil.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wcfsetup/install/files/lib/util/DateUtil.class.php b/wcfsetup/install/files/lib/util/DateUtil.class.php index 3010cff92d..6e38c6e5ca 100644 --- a/wcfsetup/install/files/lib/util/DateUtil.class.php +++ b/wcfsetup/install/files/lib/util/DateUtil.class.php @@ -518,6 +518,7 @@ final class DateUtil { $dtoNoTime = clone $dateTimeObject; $dtoNoTime->setTime(0, 0, 0); $currentDateTimeObject = self::getDateTimeByTimestamp(TIME_NOW); + $currentDateTimeObject->setTimezone(WCF::getUser()->getTimeZone()); $currentDateTimeObject->setTime(0, 0, 0); $days = $dtoNoTime->diff($currentDateTimeObject)->days; -- 2.20.1