From: Alexander Ebert Date: Tue, 31 Dec 2013 12:27:53 +0000 (+0100) Subject: Avoid timezone issues X-Git-Tag: 2.0.1~13^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e82cb50f81ea7e7d4b70eb16239d20d66c0efc27;p=GitHub%2FWoltLab%2FWCF.git Avoid timezone issues --- diff --git a/wcfsetup/install/files/lib/system/poll/PollManager.class.php b/wcfsetup/install/files/lib/system/poll/PollManager.class.php index a72d31ff7e..a507518802 100644 --- a/wcfsetup/install/files/lib/system/poll/PollManager.class.php +++ b/wcfsetup/install/files/lib/system/poll/PollManager.class.php @@ -205,17 +205,10 @@ class PollManager extends SingletonFactory { } if ($this->pollData['endTime'] && $this->pollData['endTime'] <= TIME_NOW) { - if ($this->poll === null) { + if ($this->poll === null || $this->poll->endTime >= TIME_NOW) { // end time is in the past throw new UserInputException('pollEndTime', 'notValid'); } - else { - // check if the difference to the stored time is less than 60 minutes (editing an old poll) - $difference = abs($this->poll->endTime - $this->pollData['endTime']); - if ($difference > 3599) { - throw new UserInputException('pollEndTime', 'notValid'); - } - } } // no options given