[CSHARP-48] TimeSpan serialization not working Created: 02/Jul/10 Updated: 19/Oct/16 Resolved: 04/Jul/10 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Matthias Goetzke | Assignee: | Steve Wagner |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
in BsonWriter the if statement is missing an else and thus always falls through to the last else which tries to cast the timespan into a long case BsonType.Long: should be case BsonType.Long: |
| Comments |
| Comment by Matthias Götzke [ 04/Jul/10 ] |
|
The code was a LOCAL change in our repository and i realized this too late. The change was made since we changed the codebase to store DateTime as long in order to avoid the error with mongo to store datetimes before 1970 correctly. Sadly we wrote a test for the changed behavior of DateTime but not Timespan. We consider the this ticket as closed. It might be interesting though to think about changing the driver to store dates as longs until the mongo issue is fixed. I am extremely sorry for the mixup. |
| Comment by Steve Wagner [ 03/Jul/10 ] |
|
Can you tell me where dose you have that code from? In the current code base that looks like: case BsonType.Long: |