Working in an application with PHP 5.5 + Symfony 2 + Doctrine.
In one of the tables in this application there is a updated_at
field that is initially NULL
. However, when I give getUpdatedAt()
to this entity, I get an object of type \DateTime
, and its content is as follows:
object(DateTime)#1064 (3) {
["date"]=>
string(27) "-0001-11-30 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
string(17) "America/Sao_Paulo"
}
How to test, without too much hassle, if this object was generated from a null date?