From 429ac54a3424f0f75ef414260c4bc63d83270359 Mon Sep 17 00:00:00 2001 From: gedrox Date: Wed, 11 Apr 2012 10:02:42 +0300 Subject: [PATCH] [#DWEB-103] Fixed UTC timezone creation. Constant DateTimeZone::UTC is 1024, string name is required for the DateTimeZone constructor. --- en/cookbook/working-with-datetime.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/en/cookbook/working-with-datetime.rst b/en/cookbook/working-with-datetime.rst index a4d9af898..c8620dccf 100644 --- a/en/cookbook/working-with-datetime.rst +++ b/en/cookbook/working-with-datetime.rst @@ -98,7 +98,7 @@ the UTC time at the time of the booking and the timezone the event happend in. return $value->format($platform->getDateTimeFormatString(), - (self::$utc) ? self::$utc : (self::$utc = new \DateTimeZone(\DateTimeZone::UTC)) + (self::$utc) ? self::$utc : (self::$utc = new \DateTimeZone('UTC')) ); } @@ -111,7 +111,7 @@ the UTC time at the time of the booking and the timezone the event happend in. $val = \DateTime::createFromFormat( $platform->getDateTimeFormatString(), $value, - (self::$utc) ? self::$utc : (self::$utc = new \DateTimeZone(\DateTimeZone::UTC)) + (self::$utc) ? self::$utc : (self::$utc = new \DateTimeZone('UTC')) ); if (!$val) { throw ConversionException::conversionFailed($value, $this->getName());