|
igorsol You can use:
var d = new Date()
|
d.toISOString()
|
2018-09-27T19:55:31.778Z
|
Per the Mozilla documentation:
JavaScript Date objects can only be instantiated by calling JavaScript Date as a constructor: calling it as a regular function (i.e. without the new operator) will return a string rather than a Date object; unlike other JavaScript object types, JavaScript Date objects have no literal syntax.
Since this doesn't represent a bug in MongoDB, I'll close this ticket. Let us know if you have any questions.
-Nick
|