I insert date fields into MongoDB collection using PHP-MongoDate.
For 05/29/2014, i tried like below
new MongoDate(1401321600)
and it creates ISODate("2014-05-29T00:00:00Z")
in Mongocollection which is correct
But for 05/28/1857, i tried like below
new MongoDate(-3553200000)
and it creates ISODate("1993-07-04T06:28:16Z")
in Mongocollection which is wrong
But for 05/29/2045, i tried like below
new MongoDate(2379628800)
and it creates ISODate("1909-04-22T17:31:44Z")
in Mongocollection which is wrong
PHP MongoDate is not working after / before certain year. I'm clueless about this issue. Any one know the solution for it?