Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1849

Support strict date format

    • Type: Icon: Bug Bug
    • Resolution: Incomplete
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      OS: All
      node.js / npm versions: All
      Additional info:
      Affects mongosh and mongosh in Compass
    • Not Needed
    • Developer Tools

      Problem Statement/Rationale

      Support strict JSON date formats. Currently, Online Archive requires Custom Criteria be formatted in strict JSON, so things like handling date comparisons without ISODate() require constructions like this:

      {
        "my_date_field": {"$lte": {
          "$date": "2023-07-30T00:42:00.000"
        } 
      } 

      However, this strict JSON representation of dates is not currently supported by mongosh. This means that customers do not have high confidence that their Online Archive Custom Criteria will work.

      Steps to Reproduce

      Attempt to execute strict JSON format in db.collection.find({}) match component.

      Expected Results

      Expect results. 

      Actual Results

      No results are returned, and no error is thrown.

      Additional Notes

      None

            Assignee:
            Unassigned Unassigned
            Reporter:
            matthew.royal@mongodb.com Matthew Royal
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: