From: Max Date: Sun, 19 May 2013 21:04:48 +0000 (+0300) Subject: Fixes DateUtil::validateDate() X-Git-Tag: 2.0.0_Beta_1~141^2^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=262637e4baea77e75f2e6b35076d6ef4de8d45b4;p=GitHub%2FWoltLab%2FWCF.git 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.``` --- 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"); }