Filter/Doctrine/Expression/ExpressionBuilder.php
protected function convertToSqlDateTime($date)
    {
        if ($date instanceof \DateTime) {
            $date = $this->expr()->literal($date->format(self::SQL_DATE_TIME));
        }

        return $date;
    }
protected function convertToSqlDateTime($date)
    {
        if ($date instanceof \DateTime) {
            $date = $this->expr()->literal($date->format(self::SQL_DATE_TIME));
        }

        return $date;
    }
protected function convertToSqlDateTime ( $ date ) { if ( $ date instanceof \ DateTime ) { $ date = $ this -> expr ( ) -> literal ( $ date -> format ( self :: SQL_DATE_TIME ) ) ; } return $ date ; }
Normalize date time boundary

@param DateTime|string $date
@return \Doctrine\ORM\Query\Expr\Literal
Normalize date time boundary