setTimeZone(self::$utc); return $value->format($platform->getDateTimeFormatString()); } public function convertToPHPValue($value, AbstractPlatform $platform) { if ($value === null) { return null; } if (is_null(self::$utc)) { self::$utc = new \DateTimeZone('UTC'); } $val = \DateTime::createFromFormat($platform->getDateTimeFormatString(), $value, self::$utc); if (!$val) { throw ConversionException::conversionFailed($value, $this->getName()); } return $val; } }