CK-Yong / gaip-net

Library for implementing Google Api Improvement Proposals in C#
MIT License
2 stars 1 forks source link

Bug: DateTimes are not parsed correctly #34

Closed CK-Yong closed 2 years ago

CK-Yong commented 2 years ago

Consider the following document:

{
    "CreatedAt": {
        "$date": {
            "$numberLong": "1637915469539"
        }
    }
}

The DateTime corresponds to 2021-11-26T08:31:09.539+00:00.

I expect to be able to query it like this:

CreatedAt<"2021-11-27T00:00:00+00:00"

However, this throws an exception:

FormatException: String '\"2021-11-27T00:00:00+00:00\"' was not recognized as a valid DateTime."