[DRIVERS-173] Support decoding $date from ISO-8601 string or $numberLong in JSON parsers Created: 14/Aug/14  Updated: 15/Apr/19  Resolved: 21/Dec/15

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Barrie Segal Assignee: Barrie Segal
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on CDRIVER-423 Support decoding $date from ISO-8601 ... Closed
depends on CSHARP-1069 Support decoding $date from ISO-8601 ... Closed
depends on CXX-343 Support decoding $date from ISO-8601 ... Closed
depends on PYTHON-759 Support $date as an ISO-8601 string o... Closed
Related
related to SERVER-15275 Datetimes before the epoch are export... Closed
related to TOOLS-609 Datetimes close to the epoch can not ... Closed
related to SERVER-11813 In strict-json mode, represent dates ... Closed
Driver Compliance:
Key Status/Resolution FixVersion
PYTHON-759 Done 2.8, 3.0
CSHARP-1069 Duplicate
CDRIVER-423 Done 1.1.0
CXX-343 Done legacy-1.0.0-rc1

 Description   

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.



 Comments   
Comment by Rathi Gnanasekaran [ 21/Dec/15 ]

All related tickets are closed so closing this one.

Generated at Thu Feb 08 08:20:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.