Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-173

Support decoding $date from ISO-8601 string or $numberLong in JSON parsers

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: None
    • Labels:
      None
    • $i18n.getText("admin.common.words.hide")
      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
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } 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

      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.

            Assignee:
            barrie Barrie Segal
            Reporter:
            barrie Barrie Segal
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: