From: Alexander Ebert Date: Mon, 2 Jan 2017 23:46:26 +0000 (+0100) Subject: Fixed incorrect timezone calculation X-Git-Tag: 3.0.0~74 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b2204e3d38abff27dd16754cb65f302cf51dabac;p=GitHub%2FWoltLab%2FWCF.git Fixed incorrect timezone calculation --- 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;