php DateTime with date without hours
<pre><code>new \DateTime();
/*
DateTime Object
(
    [date] =&gt; 2016-04-20 04:45:24.000000
    [timezone_type] =&gt; 3
    [timezone] =&gt; UTC
)
*/  
</code></pre>

<p>How do I trim hours to get my DateTime object like this:</p>

<pre><code>/*
DateTime Object
(
    [date] =&gt; 2016-04-20 00:00:00.000000
    [timezone_type] =&gt; 3
    [timezone] =&gt; UTC
)
*/
</code></pre>

<p>The only way that I know is:</p>

<pre><code>$date = new \DateTime();
$date-&gt;format('Y-m-d');
$date = new \DateTime($date-&gt;format('Y-m-d'));
</code></pre>

<p>But I don't like this solution.</p>