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

Incorrect ISODate format output for year before 0000

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • None
    • 4.0.2, 4.2.0
    • None
    • Query 2020-01-27, Query 2020-02-10, Query 2020-02-24, Query 2020-03-09

    Description

      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")

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: