php - Store dates in MongoDB as integer rather than MongoDate value -
Could there be any damage to the strings (timestamps) in the MongoDB instead of stored in their MongoDate format?
Because I'm having problems with the Zend Framework and Principle ODM to read data, because I return them to as the date of the date as an internal form From MongoDB seems to save them as a timestamp, but for this it has its own object.
Mongodebi uses its own
While using the principle of ODM, This value is converted into a datetime PHP object.
You can create a custom date type with the principle that the MongoDate object changes into a Zend_Date object:
Principles \ ODM \ MongoDB \ Mapping \ types \ Type :: overrideType ("date", "My_Date_Class");
In this way you leave the datetime object on the PHP side, but store the correct date objects that MondiDiDi can understand.
Comments
Post a Comment