Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-983

extjson date parser doesn't work for dates after the year 2262

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.0.2
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible

      When parsing relaxed extended JSON with a date string, the code in https://github.com/mongodb/mongo-go-driver/blob/master/bson/bsonrw/extjson_wrappers.go#L206 uses the UnixNano function (https://golang.org/pkg/time/#Time.UnixNano) which can't represent dates after the year 2262. 

      This can be changed to

      t.Unix()*1e3 + t.Nanosecond()/1e6

      instead.

            Assignee:
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Reporter:
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: