[SERVER-11813] In strict-json mode, represent dates with strings. Created: 21/Nov/13  Updated: 27/Oct/15  Resolved: 28/Dec/13

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 2.5.4
Fix Version/s: 2.5.5

Type: Improvement Priority: Major - P3
Reporter: Andy Schwerin Assignee: Shaun Verch
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to DOCS-3879 Change in mongoexport output format f... Closed
related to SERVER-11659 Audit strict json output for auditing... Closed
is related to TOOLS-138 bsondump does not produce valid json ... Closed
is related to TOOLS-140 bsondump produces invalid JSON Closed
is related to CSHARP-963 Support ISO8601 strings in extended J... Closed
is related to DRIVERS-173 Support decoding $date from ISO-8601 ... Closed
Backwards Compatibility: Minor Change
Participants:

 Description   

Rather than represent dates in strict json as number of milliseconds since the UNIX epoch, they should be represented as an ISO-8601 date string, as follows:

{ "appointmentTime": { "$date": "2013-11-21T14:30:00.000-0500" } }



 Comments   
Comment by Robert Stam [ 28/Apr/14 ]

This is a breaking change to any programs that were consuming the output of mongoexport.

Comment by Githook User [ 19/Dec/13 ]

Author:

{u'username': u'Zarkantho', u'name': u'Shaun Verch', u'email': u'shaun.verch@10gen.com'}

Message: SERVER-11813 Output date as string in jsonString strict mode
Branch: master
https://github.com/mongodb/mongo/commit/597251304e2633e89d260a8c55a0ab11e0d0f6b2

Comment by Githook User [ 17/Dec/13 ]

Author:

{u'username': u'Zarkantho', u'name': u'Shaun Verch', u'email': u'shaun.verch@10gen.com'}

Message: Revert "SERVER-11813 Output date as string in jsonString strict mode"

This reverts commit 8e3fda2d14c9cc7626bfbabfd834a34ee0d95e64.
Branch: master
https://github.com/mongodb/mongo/commit/b1daf8ef3e362a64a9c459c4993d53d0a7b1208d

Comment by Githook User [ 16/Dec/13 ]

Author:

{u'username': u'Zarkantho', u'name': u'Shaun Verch', u'email': u'shaun.verch@10gen.com'}

Message: SERVER-11813 Output date as string in jsonString strict mode
Branch: master
https://github.com/mongodb/mongo/commit/8e3fda2d14c9cc7626bfbabfd834a34ee0d95e64

Comment by Eric Milkie [ 26/Nov/13 ]

We can use dateToISOStringUTC(Date_t) in mongo/util/time_support.h. Note, if we want to let customers get times in local time, we can use dateToISOStringLocal(Date_t).

Generated at Thu Feb 08 03:26:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.