Open cmaart opened 1 year ago
Hi @cmaart This is because of a change that was implemented in the dotnet driver. At the very latest, this will be fixed in 5.11.
Issue still persists in 5.11.
@awatertrevi The driver was changed removing lazy parsing of ZonedDateTimes, but instead it can return something such as: "{ UtcSeconds: 1000, Nanoseconds: 0, Zone: "Antartica/Troll" }"
this is because in order to convert the ZonedDateTime to the local date & time values the driver needs to be able to look up the offset from UTC, but if the zone is unknown to the OS it will fail.
The reason the driver does not throw is because zones that might not be legal on one machine may be legal on the neo4j server.
If you have further details or recreation scenarios that don't match this case, please let me know.
Describe the bug Neo4j Driver seems to return DateTime as lazy-ZonedDateTime which is not deserialized as DateTime.
Seems to happen only when using return as anonymous object not when returning types directly. Works:
Return.As<Model>("n")
DateTime properties are nullReturn(() => new { MyModel = Return.As<Model>("n")})
Usage:
Deserialization in Neo4jClient shows Json contains lazy-ZonedDateTime
Downgrading to the latest 4.x version fixes the issue.
Versions: