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

XMLWordPrintableJSON

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

      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 (Inactive)
            Reporter:
            Divjot Arora (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: