Fixed incorrect timezone calculation
authorAlexander Ebert <ebert@woltlab.com>
Mon, 2 Jan 2017 23:46:26 +0000 (00:46 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 2 Jan 2017 23:46:33 +0000 (00:46 +0100)
wcfsetup/install/files/lib/util/DateUtil.class.php

index 3010cff92d5206dea91b63144a00aee2509c617b..6e38c6e5ca7f697dd979377ff10dd7d97f0babaf 100644 (file)
@@ -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;