[CSHARP-945] Consider throwing ArgumentOutOfRangeException when DateTime overload of ObjectId is out of range. Created: 02/Apr/14  Updated: 02/Apr/15  Resolved: 09/May/14

Status: Closed
Project: C# Driver
Component/s: BSON
Affects Version/s: None
Fix Version/s: 2.0

Type: Bug Priority: Minor - P4
Reporter: Craig Wilson Assignee: Robert Stam
Resolution: Done Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Minor Change

 Description   

ObjectId's contain a timestamp component that is a 32-bit integer. We have an overload allowing the user to specify a DateTime as the timestamp field. .NET's DateTime class allows for values beyond the range of a 32-bit integer. We should consider throwing an ArgumentOutOfRangeException when one of these is used.



 Comments   
Comment by Githook User [ 09/May/14 ]

Author:

{u'name': u'rstam', u'email': u'robert@10gen.com'}

Message: CSHARP-945: Throw ArgumentOutOfRangeException when ObjectId constructor is passed a DateTime that is out of range.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/b4ac89b0b7df8f0a5cbcd24d7f1e183aebfc930e

Generated at Wed Feb 07 21:38:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.