本文介绍了使用PHP创建MongoDB的ISODate的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用Python进行了大量的预处理,驱动程序使用ISODate作为本地日期/时间转换。现在,PHP使用类,它们赋予 { sec:1296536400,usec:0} 作为我的日期。有没有强制PHP使用ISODate或反之亦然与Python(和pymongo)?我需要兼容的日期,但原生格式似乎不想打好。

I did a lot of preprocessing with Python, and the pymongo driver uses ISODate for it's native date / time translation. Now PHP uses the MongoDate class which give {"sec":1296536400,"usec":0} as my "date". Is there anyway to force PHP to use an ISODate or vice-versa with Python (and pymongo)? I need compatible dates but the native formats don't seem to want to play nice.

推荐答案

MongoDate在和。我猜这个问题已经改变了。

MongoDate are in ISODate and in PHP. I guess it has changed since the question.

这篇关于使用PHP创建MongoDB的ISODate的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-22 11:58