Commit 83b247b8 authored by beberlei's avatar beberlei

DDC-179 - Use ! modifier in Date Format to reset all non-date parts to zero...

DDC-179 - Use ! modifier in Date Format to reset all non-date parts to zero unix timestamp values, i.e. H:i:s => '00:00:00' always
parent 03d69eea
......@@ -1719,7 +1719,7 @@ abstract class AbstractPlatform
*/
public function getDateFormatString()
{
return 'Y-m-d';
return '!Y-m-d';
}
/**
......
......@@ -34,4 +34,11 @@ class DateTest extends \Doctrine\Tests\DbalTestCase
instanceof \DateTime
);
}
public function testDateResetsNonDatePartsToZeroUnixTimeValues()
{
$date = $this->_type->convertToPHPValue('1985-09-01', $this->_platform);
$this->assertEquals('00:00:00', $date->format('H:i:s'));
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment