Mongo Db の更新クエリを実行しようとしています。私はphpを使用し、更新される値を送信します。ミリ秒単位で日付パラメーターを送信します。しかし、うまくいきませんでした。コードは次のとおりです。
function updateEventById($id1,$start,$end,$collection)
{
$this->collection = $this->database->$collection;
//$start=new MongoDate($start);
//$end=new MongoDate($end);
$newdata = array('$set' => array("start.sec" => $start,
"end.sec" => $end ));
$theObjId = new MongoId($id1["\$id"]);
$this->collection->update(array("_id" => $theObjId), $newdata);
}