How to change the data type (datetime) to (date) in the conditions of a running find?
<p>I need get all posts from the current day (today), with the <code>find</code> below I'm not getting anything because the field <code>pub_date (datetime)</code> has time and the <code>new \Datetime()</code>  returns the current date and time so, the date will match but the time not.</p>

<pre><code>    $posts = $this-&gt;find('all', [
        'fields' =&gt; [
            'Posts.id',
            'Posts.title',
            'Posts.body',
            'Posts.pub_date',
        ],
        'conditions' =&gt; [
            'Posts.is_active' =&gt; true,
            'Posts.pub_date' =&gt; new \Datetime()
        ],
    ]);
</code></pre>

<p>In short terms, I need get all posts with date equal "today" dont matter the time.</p>