diff --git a/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php b/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php index 165fa9aed..58632c4c1 100644 --- a/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php @@ -1719,7 +1719,7 @@ abstract class AbstractPlatform */ public function getDateFormatString() { - return '!Y-m-d'; + return 'Y-m-d'; } /** diff --git a/lib/Doctrine/DBAL/Types/DateType.php b/lib/Doctrine/DBAL/Types/DateType.php index 29aee72ad..9709ef137 100644 --- a/lib/Doctrine/DBAL/Types/DateType.php +++ b/lib/Doctrine/DBAL/Types/DateType.php @@ -30,6 +30,6 @@ class DateType extends Type public function convertToPHPValue($value, AbstractPlatform $platform) { return ($value !== null) - ? \DateTime::createFromFormat($platform->getDateFormatString(), $value) : null; + ? \DateTime::createFromFormat('!'.$platform->getDateFormatString(), $value) : null; } } \ No newline at end of file