From e82cb50f81ea7e7d4b70eb16239d20d66c0efc27 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 31 Dec 2013 13:27:53 +0100 Subject: [PATCH] Avoid timezone issues --- .../install/files/lib/system/poll/PollManager.class.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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 -- 2.20.1