[SERVER-14623] ObjectId.fromDate is not correct for all dates Created: 21/Jul/14 Updated: 22/Jul/15 Resolved: 29/Jul/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | JavaScript |
| Affects Version/s: | 2.7.2 |
| Fix Version/s: | 2.7.5 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | James O'Leary | Assignee: | James O'Leary |
| Resolution: | Done | Votes: | 0 |
| Labels: | community-team | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | Run the following code in a v2.7.2/v2.7.3 shell :
|
||||||||
| Sprint: | Server 2.7.4, Server 2.7.5 | ||||||||
| Participants: | |||||||||
| Description |
|
The ObjectId.fromDate fails for dates less than (Math.pow(2,28) - 1). The code on line 379 should look something like :
|
| Comments |
| Comment by Githook User [ 29/Jul/14 ] | |
|
Author: {u'username': u'jimoleary', u'name': u'Jim OLeary', u'email': u'jim.oleary@gmail.com'}Message: ObjectId.fromDate is not correct for all dates There is an under-run for dates less than 1978-07-04T21:24:15Z ('Math.pow(2,28) - 1' seconds) Closes #725 Signed-off-by: Benety Goh <benety@mongodb.com> | |
| Comment by James O'Leary [ 28/Jul/14 ] | |
|
A Simpler solution is just :
|