-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Unknown
-
None
-
Affects Version/s: 5.0.0
-
Component/s: BSON
What problem are you facing?
Milliseconds precision is truncated with bson.EJSON.serialize(new Date()).
What driver and relevant dependency versions are you using?
bson: 5.0.0
Steps to reproduce?
const { EJSON } = require('bson')
const res = new Date("2023-01-01T12:35:31.000Z")
EJSON.serialize(res)
Current
{ '$date': '2023-01-01T12:35:31Z' }