Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-5759

Encoding of dates after year 9999 disagree with spec

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.29.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • C Drivers
    • Not Needed

      When encoding the date from Unix timestamp 253402300800000 (in milliseconds) the C driver produces:

      {"$date":"10000-01-01T00:00:00Z"}
      

      The extended JSON spec describes "Datetime [year before 1970 or after 9999]" to have the same encoding for Canonical Extended JSON and Relaxed Extended JSON.

      The expected encoding is:

      {"$date":{"$numberLong":"253402300800000"}
      

            Assignee:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: