创建日期对象MongoDB新的php驱动程序


Create Date Object MongoDB new php driver

我正在尝试创建Date Object以使用PHP在MongoDB中创建文档。

我在PHP文档中看到了new MongoDate()但是我正在使用PHP7的"新"驱动程序MongoDB(此文档),但我不能使用它。

我尝试使用MongoDB''BSON''Date,但我得到了Class 'Date' not found

我搜索了新的驱动程序文档和堆栈溢出,但什么都没有......

有谁知道如何使用"新"php驱动程序创建日期对象?

类的名称是 'MongoDB'BSON'UTCDateTime : http://php.net/manual/en/class.mongodb-bson-utcdatetime.php