Incorrect ISODate format output for year before 0000

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: 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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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
            Reporter:
            Morty Choi
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: