I want to insert a date into a collection. I use the class MongoDate to create the date object:
MongoDate
$today = new MongoDate(strtotime(date(\'Y-m-d 00
$dt = new DateTime(date('Y-m-d'), new DateTimeZone('UTC')); $ts = $dt->getTimestamp(); $today = new MongoDate($ts);
This is working.