-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
Affects Version/s: None
-
Labels:None
In the Extended JSON reference for the Date type, the Shell style format is
new Date ( <date> )
where <date> is a 64 bit signed integer of millis since epoch.
However, while this format is accepted by the shell, it is not what the shell actually outputs:
> tojson(new Date(NumberLong("1453087907438"))) ISODate("2016-01-18T03:31:47.438Z")
This format is much easier for humans to work with (while still being reasonable for machines to deal with).
This has been the case since MongoDB 1.8, and so has become the defacto standard.
Thus, although ISODate is not a type (DOCS-2927), it is a valid Shell-mode Extended JSON representation of Date objects. Therefore the docs should be updated to list both of these forms as acceptable representations.
- related to
-
DOCS-2539 Document ISODate support in JSON parser
- Closed