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
    • None

      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: