public function convertToPHPValue($value, AbstractPlatform $platform)
 {
     if ($value === null) {
         return null;
     }
     $val = \DateTime::createFromFormat($platform->getDateTimeFormatString(), $value, self::$utc ? self::$utc : (self::$utc = new \DateTimeZone(\DateTimeZone::UTC)));
     if (!$val) {
         throw ConversionException::conversionFailed($value, $this->getName());
     }
     return $val;
 }
Ejemplo n.º 2
0
 public function convertToPHPValue($value, AbstractPlatform $platform)
 {
     return $value !== null ? DateTime::createFromFormat($platform->getDateTimeFormatString(), $value) : null;
 }