Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-3879

Change in mongoexport output format for dates

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • v1.3.11, mongodb-2.6
    • Affects Version/s: mongodb-2.6
    • Component/s: manual
    • Labels:
      None

      SERVER-11813 changed the output format for BSON date values in strict-json. This was introduced in 2.5.5.

      This means that mongoexport in 2.6 now produces different output for date values.

      $ /mongodb-2.2.default/bin/mongoexport -d test -c test
      { "_id" : { "$date" : 1407433938490 } }
      
      $ /mongodb-2.4.default/bin/mongoexport -d test -c test
      { "_id" : { "$date" : 1407433938490 } }
      
      $ /mongodb-2.6.default/bin/mongoexport -d test -c test
      { "_id" : { "$date" : "2014-08-07T13:52:18.490-0400" } }
      

      The value is ISO-8601 format using the local timezone of the system mongoexport is running on. We failed to document this change for the 2.6 release. This is a breaking change to any programs that were consuming the output of mongoexport.

      Related parsing changes: DOCS-2539

            Assignee:
            andrew.aldridge@mongodb.com Andrew Aldridge
            Reporter:
            matt.kangas Matt Kangas
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:
              9 years, 8 weeks, 6 days ago