1
0
mirror of synced 2024-12-13 22:56:04 +03:00

[#DWEB-103] Fixed UTC timezone creation. Constant DateTimeZone::UTC is 1024, string name is required for the DateTimeZone constructor.

This commit is contained in:
gedrox 2012-04-11 10:02:42 +03:00
parent e168b4e543
commit 429ac54a34

View File

@ -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());