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

Dates before epoch not retrieved correctly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.2.4, 1.4.0
    • Fix Version/s: 1.9.1
    • Component/s: JavaScript, Shell
    • Labels:
      None
    • Environment:
      OS X Snow Leopard, Windows 2003 R2

      Description

      Mongo fails to round-trip the date before epoch when inserted via shell:

      > t = db.date1;
      > t.drop();
      > var d = new Date(-1);
      > t.save(

      {a:1, d:d}

      );
      > assert.eq(d, t.findOne().d, "Should be equal");
      assert: ["Wed Dec 31 1969 23:59:59 GMT+0000 (BST)"] != ["Tue Jan -2147483647 584556020 15:25:52 GMT+0100 (BST)"] are not equal : Should be equal

      Reproducible on OS X version 1.2.4 32/64-bit, 1.4.0/64, 1.4.1-pre/64, 1.5.0-pre and on Windows 1.4.0 32-bit.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                6 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: