I understand from ObjectId — MongoDB Manual that the first 4 bytes of any mongodb object id is the creation timestamp.
有没有可靠的方法从mongoose 身上提取这些信息?
I understand from ObjectId — MongoDB Manual that the first 4 bytes of any mongodb object id is the creation timestamp.
有没有可靠的方法从mongoose 身上提取这些信息?
我相信ObjectId有一个getTimestamp()方法;例如
_id.getTimestamp()