From 262637e4baea77e75f2e6b35076d6ef4de8d45b4 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 20 May 2013 00:04:48 +0300 Subject: [PATCH] Fixes DateUtil::validateDate() Fixes WoltLab/WCF#1283 as gmdate returns a date in GMT but strtotime doesn't if input isn't specified as GMT. See http://www.php.net/manual/en/function.strtotime.php > Each parameter of this function uses the default time zone unless a time zone is specified in that parameter.``` --- wcfsetup/install/files/lib/util/DateUtil.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/util/DateUtil.class.php b/wcfsetup/install/files/lib/util/DateUtil.class.php index 02893cb30d..fd022449f5 100644 --- a/wcfsetup/install/files/lib/util/DateUtil.class.php +++ b/wcfsetup/install/files/lib/util/DateUtil.class.php @@ -363,7 +363,7 @@ final class DateUtil { } // try to convert $date into a UNIX timestamp - $time = @strtotime($date); + $time = @strtotime($date." GMT"); if ($time === false) { throw new SystemException("date '".$date."' is invalid"); } -- 2.20.1