edgedb / edgedb-net

The official .NET client library for EdgeDB

Home Page:https://edgedb.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix rounding when encoding timestamps

tailhook opened this issue · comments

According to edgedb/edgedb#4885 conversion should round up to nearest even.

This should happen when encoding .Net native time format into a millisecond precision:

1970-01-01T00:00:00.0000005 -> 1970-01-01T00:00:00.000000
1970-01-01T00:00:00.0000015 -> 1970-01-01T00:00:00.000002

Also check LocalTime, Duration and LocalDatetime types.

This should happen across all the range of the values, see Rust tests for more comprehensive set of tests (but adjust precision conversion and time format accordingly). And the docs PR for more info.

Merged in #28, I'll close when a release comes out with the changes

Published in 1.0.5