Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-214

mongoimport ignores fields when import file contains big dates

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.8.0-rc0
    • Affects Version/s: None
    • Component/s: mongoimport
    • None

      Steps to reproduce:

      > db.test.insert(

      {"to" : ISODate("3013-01-01T00:00:00Z"), "a" : 1 }

      )
      > db.test.findOne()
      {
      "_id" : ObjectId("5416ba106bb629d51582af74"),
      "to" : ISODate("3013-01-01T00:00:00Z"),
      "a" : 1
      }

      $ mongoexport --host localhost -d test -c test --out /tmp/test
      $ mongoimport --host localhost --db test -c test2 -file /tmp/test

      > db.test2.findOne()
      {
      "_id" : ObjectId("5416ba106bb629d51582af74"),
      "to" : ISODate("3013-01-01T00:00:00Z")
      }

      In general, every field which appears after "to" field will not be imported. When I use lower years such as 2039 it works.

            Assignee:
            Unassigned Unassigned
            Reporter:
            killawatt Shani
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: