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

Incorrect ISODate format output for year before 0000

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 4.0.2, 4.2.0
    • Component/s: None
    • Query 2020-01-27, Query 2020-02-10, Query 2020-02-24, Query 2020-03-09

      The ISODate format is wrong for date-time which year is negative.

      If I mongoexport the collection with data with these values, I can't mongoimport back those records.

      Enter the following in mongo console

      > new Date("0000-01-01T00:00:00.000+08:00")

      ISODate("00-1-12-31T16:00:00Z")

            Assignee:
            justin.seyster@mongodb.com Justin Seyster
            Reporter:
            mortyccp@gmail.com Morty Choi
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: