Querying With MongoDate vs UTCDateTime
<p>After upgrading to the new Mongo Driver for PHP, I am facing the problem of sorting and querying dates.</p>

<p>The old driver used: <a href="http://php.net/manual/en/class.mongodate.php" rel="noreferrer">http://php.net/manual/en/class.mongodate.php</a> which stored dates in a MongoDate object in seconds.</p>

<p>The new driver: <a href="http://php.net/manual/en/class.mongodb-bson-utcdatetime.php" rel="noreferrer">http://php.net/manual/en/class.mongodb-bson-utcdatetime.php</a> stores the date in a different format and stores it in milliseconds.</p>

<p>The has rendered querying with $gte or $lte useless. Example:</p>

<pre><code>$collection -&gt; find(array('start_date' =&gt; array('$gte' =&gt; new MongoDate())));

$collection -&gt; find(array('start_date' =&gt; array('$gte' =&gt; new MongoDB\BSON\UTCDateTime())));
</code></pre>

<p>These two do not return the same result. With all the old data, how can I safely still query with both MongoDate and UTCDateTime?</p>