This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----- mongo to js ------ | |
timeStamp = parseInt(Mongo.ObjectId().toString().substr(0,8), 16)*1000 | |
date = new Date(timestamp) | |
----------------------------- | |
----- js to mongo ----- | |
timestamp = new Date().getTime()/1000 | |
mongoId = new ObjectID(timestamp.toString(16)+1e16) |
NewerOlder