-
Type:
Bug
-
Resolution: Done
-
Priority:
Critical - P2
-
Affects Version/s: 2.2.0
-
Component/s: BSON
-
None
After updating to the 2.2.0 Node.js driver, ObjectIDs are being returned with the underlying BSON big endian byte order for the unixtime rather than the expected little endian:
oid = require('mongodb').ObjectID
console.log(oid())
// 2.2.0 driver
3720835756801c9b60a29d84
// 2.1.21 driver (and expected format)
57832378f392393d68cf8d06
See also: http://stackoverflow.com/questions/38295305/mongojs-objectid-produces-wrong-timestamp