-
Type:
Task
-
Resolution: Done
-
Priority:
Critical - P2
-
None
-
Affects Version/s: 2.0.2
-
Component/s: None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Hi,
in our object model we have some DateTimeOffset properties that are stored in mongodb like that when using the c# driver.
"ct" : [NumberLong("635832589587284402"), 0]
Now we wanted to put a compoundindex on our document that included one of those DateTimeOffset fields. We found out that the index would make our query not work anymore when it includes the DateTimeOffset field. So far so good. The DateTimeOffset is stored as array of Ticks in LocalTime and the offset to UTC.
We could make the index work by using something like ct.0 but with that wewould only query on the ticks in localTime. For us this might lead to inconsistent results so we don't want to go that way.
What is the best approach to solve this issue? We are thinking about our own serializer for the DateTimeOffset fields so we can serlialze those fields in UTC.
Regards
Hendrik