Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 PHP 驱动程序将日期/时间 (UTC) 存储到 MongoDB?所以在 PHP 中,如果我这样做:
$utc = gmmktime();
我可以简单地做:
$utc = new MongoDate($utc);
谢谢。
Yeap, this is the solution:
new MongoDate(gmmktime());