[GODRIVER-1181] Using only UnixNano to convert time.Time to MongoDB Datetimes misses large amounts of possible datetimes Created: 02/Jul/19 Updated: 07/Aug/20 Resolved: 07/Aug/20 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | BSON |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Patrick Meredith | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | jeff-close | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
https://github.com/mongodb/mongo-go-driver/search?q=UnixNano&unscoped_q=UnixNano Using UnixNano results in underflow for large and small dates (dates sufficiently far from January 1st, 1970). The following calculation should be used instead:
|