在使用 MongoDB\BSON\UTCDateTime 进行查询时,请确保对于 strtotime 实例,您将构造函数放在毫秒中
$start = new MongoDB\BSON\UTCDateTime(strtotime("midnight") * 1000);
$filter = ['date' => ['$gte' => $start]];
$options = ['sort' => ['date' => -1]];
$query = new MongoDB\Driver\Query($filter,$options);