From: Alexander Ebert Date: Fri, 9 Aug 2013 11:28:57 +0000 (+0200) Subject: Fixed date calculation X-Git-Tag: 2.0.0_Beta_7~31^2~12 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=146866a4fa3f3136cc03590ee9c2e0907439029d;p=GitHub%2FWoltLab%2FWCF.git Fixed date calculation --- diff --git a/wcfsetup/install/files/lib/util/CronjobUtil.class.php b/wcfsetup/install/files/lib/util/CronjobUtil.class.php index 66a54c7730..ee92eaeff4 100644 --- a/wcfsetup/install/files/lib/util/CronjobUtil.class.php +++ b/wcfsetup/install/files/lib/util/CronjobUtil.class.php @@ -164,8 +164,8 @@ final class CronjobUtil { $timeBase = self::$timeBase; if ($addAnDay) { - $date = getdate($timeBase); - $timeBase = gmmktime(0, 0, 1, $date['mon'], $date['mday'] + 1, $date['year']); + $date = explode('.', gmdate("d.m.Y", $timeBase)); + $timeBase = gmmktime(0, 0, 1, $date[1], $date[0] + 1, $date[2]); } $day = gmdate('j', $timeBase); @@ -305,10 +305,9 @@ final class CronjobUtil { $index = self::findKey($hour, $values['hour'], false); if ($index === false) { - if ($index === false) { - $index = self::findKey($hour, $values['hour']); - $addAnDay = true; - } + $index = self::findKey($hour, $values['hour']); + $addAnDay = true; + $hour = $values['hour'][$index]; } }