Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-5744

Date fields show as $numberLong in JSON mode

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.36.0
    • Affects Version/s: 1.31.2
    • Component/s: CRUD
    • None
    • Environment:
      macOS Big Sur 11.6.5
    • 2
    • Iteration Narwhal, Iteration Quahog, Iteration Ragfish, Iteration Seahorse
    • Not Needed

      Problem Statement/Rationale

      When editing a document in JSON mode or when duplicating a document, any Date type field now shows up as a $numberLong value instead of a UTC date string like before.

      Steps to Reproduce

      Edit any document in JSON mode with any number of Date type fields

      Expected Results

       

      {
        "myDateField": {
          "$date": "2022-04-18T00:00:00Z"
        }
      }

       

       

       

      Actual Results

      {
        "myDateField": {
          "$date": {
            "$numberLong": "1648425600000"
          }
        }
      } 

       

            Assignee:
            leroux.bodenstein@mongodb.com Le Roux Bodenstein
            Reporter:
            adam@adamcrowe.net Adam Crowe
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: