The oplog has a field called ts, which looks like this:
{"ts":"6533707677506207745","t":2,"h":"-7325657776689654694", ...}
I want to query the oplog, like so:
db.oplog.rs.find({ts:{$gt:x}});
how can I generate a Timestamp, that represents now? How about 30 seconds before now?
if I do:
const x = new Timestamp();
I get a error saying:
What is the correct way to generate a Timestamp? How can I query the oplog with the right ts value?
Here are the docs for Timestamp: http://mongodb.github.io/node-mongodb-native/core/api/Timestamp.html
but I cannot figure out what low number/high number is about.