[#DWEB-103] Fixed UTC timezone creation. Constant DateTimeZone::UTC is 1024, string name is required for the DateTimeZone constructor.
This commit is contained in:
parent
e168b4e543
commit
429ac54a34
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user