-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Component/s: None
-
None
For MongoDB 2.6 mongoexport was changed to export BSON datetimes as either ISO-8601 strings (datetimes since the epoch) or $numberLong (datetimes before the epoch). Drivers with JSON parsers must support decoding both types.
Note also that mongoexport outputs ISO-8601 format with localtime offset - in (+|-)HHMM format. This is likely a problem for languages that have no built in timezone support. See an example in SERVER-15278. In this case the driver will have to parse the offset and convert the result to UTC. Since the machine that parses the $date might not have the same timezone as the machine that ran mongoexport, returning a naive datetime isn't really an option.
- depends on
-
CDRIVER-423 Support decoding $date from ISO-8601 string or $numberLong in JSON parsers
- Closed
-
CSHARP-1069 Support decoding $date from ISO-8601 string or $numberLong in JSON parsers
- Closed
-
CXX-343 Support decoding $date from ISO-8601 string or $numberLong in JSON parsers
- Closed
-
PYTHON-759 Support $date as an ISO-8601 string or $numberLong in json_util.object_hook
- Closed
- related to
-
SERVER-15275 Datetimes before the epoch are exported as $numberLong
- Closed
-
TOOLS-609 Datetimes close to the epoch can not be round tripped using mongoexport and mongoimport
- Closed
-
SERVER-11813 In strict-json mode, represent dates with strings.
- Closed