Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-83

Inserting Date(0) creates empty object

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 0.9.4
    • Affects Version/s: 0.9.3
    • Component/s: JavaScript, Shell
    • Labels:
      None

      Using the Mongo shell:

      Pre-SpiderMonkey (using an old nightly from 2009-05-04):

      > db.test.remove()
      > db.test.insert(

      {'d':new Date(0)}

      )

      {"d" : "Thu Jan 01 1970 00:00:00 GMT+0000 (UTC)" , "_id" : "4a23b8615b7500843af9a5e3"}

      With the latest nightly:

      > db.test.remove()
      > db.test.insert(

      {'d':new Date(0)}

      )
      > db.test.find()
      {"_id" : "4a23b88b02d692f259b63728" , "d" : {}}

      Any idea why an empty object is inserted?

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            goosmurf Yun Huang Yong
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: