Home  >  Article  >  Backend Development  >  PHP mongo extension is upgraded to mongodb. What does this replace new MongoDate()?

PHP mongo extension is upgraded to mongodb. What does this replace new MongoDate()?

WBOY
WBOYOriginal
2016-08-04 09:21:391102browse

Mongo extension upgraded to mongodb
The original new MongoDate() is no longer available. Is there an alternative?

Reply content:

Mongo extension upgraded to mongodb
The original new MongoDate() is no longer available. Is there an alternative?

The MongoDBBSONUTCDateTimeclass is provided in the new extension as a date and time class.
The classes that can be converted during the migration process from the old extension to the new extension are noted in the documentation of PHP Mongo:
http://php.net/manual/zh/class.mongodate.php
http:// php.net/manual/zh/class.mongodb-bson-utcdatetime.php

PHP mongo extension is upgraded to mongodb. What does this replace new MongoDate()?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn