Fix rounding when encoding timestamps
tailhook opened this issue · comments
Paul Colomiets commented
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.
Quin Lynch commented
Merged in #28, I'll close when a release comes out with the changes
Quin Lynch commented
Published in 1.0.5