-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.6.0
-
Component/s: None
-
None
-
ALL
In SERVER-11813 mongoexport was changed to output BSON datetime as a string instead of an integer. Apparently this change was never made for datetimes before the epoch.
From the shell:
repl0:PRIMARY> db.bar.find() { "_id" : ObjectId("5418b3d2fba5220c4bff1a1b"), "dt" : ISODate("1969-12-31T16:00:00Z") } { "_id" : ObjectId("5418b3f0fba5220c4bff1a1c"), "dt" : ISODate("1970-01-01T00:00:00Z") }
mongoexport:
$ ./mongoexport -d foo -c bar connected to: 127.0.0.1 { "_id" : { "$oid" : "5418b3d2fba5220c4bff1a1b" }, "dt" : { "$date" : { "$numberLong" : "-28800000" } } } { "_id" : { "$oid" : "5418b3f0fba5220c4bff1a1c" }, "dt" : { "$date" : "1969-12-31T16:00:00.000-0800" } }
- is related to
-
TOOLS-1422 Mongoimport cannot import dates that mongoexport outputs
- Closed
-
DRIVERS-173 Support decoding $date from ISO-8601 string or $numberLong in JSON parsers
- Closed