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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Done
    • None
    • None
    • None

    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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: