Open valenman opened 8 years ago
In this situation date '1900-01-01 08:58:03.000' will not converted right. because condition don't have "else" block and always overwrites $val `
$timestamp = strtotime($value); if($timestamp === false) { $val = \DateTime::createFromFormat($platform->getDateTimeFormatString(), $value); if (!$val) { throw ConversionException::conversionFailedFormat($value, $this->getName(), $platform->getDateTimeFormatString()); } } $val = new \DateTime(); $val->setTimestamp($timestamp); `
I think u need use this fix `
$timestamp = strtotime($value); if($timestamp === false) { $val = \DateTime::createFromFormat($platform->getDateTimeFormatString(), $value); if (!$val) { throw ConversionException::conversionFailedFormat($value, $this->getName(), $platform->getDateTimeFormatString()); } } else { $val = new \DateTime(); $val->setTimestamp($timestamp); }`
In this situation date '1900-01-01 08:58:03.000' will not converted right. because condition don't have "else" block and always overwrites $val `
I think u need use this fix `