-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
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.
- backported by
-
GODRIVER-1008 Backport "extjson date parser doesn't work for dates after the year 2262"
- Closed
- is related to
-
GODRIVER-1181 Using only UnixNano to convert time.Time to MongoDB Datetimes misses large amounts of possible datetimes
- Closed
- related to
-
GODRIVER-1688 primitive.NewDateTimeFromTime only allows years between 1678 and 2262
- Closed