Skip to content

Conversation

@iStefo
Copy link

@iStefo iStefo commented Jan 26, 2026

I noticed that NaiveDateTime structs decoded from DateTime64(0) or DateTime64(3) did not have the correct precision, so I added truncation. For DateTime, this was not a problem since they are always created with the appropriate time unit.

While I also saw the TODO on https://github.com/almatoai/ch/blob/naivedatetime-precision/test/ch/ecto_type_test.exs#L376, I'm not sure if this needs fixing right now.

@iStefo iStefo changed the title DecodeBinary: Correctly truncate NaiveDateTime resulting from DateTime64 RowBinary: Correctly truncate NaiveDateTime resulting from DateTime64 Jan 26, 2026
@iStefo iStefo changed the title RowBinary: Correctly truncate NaiveDateTime resulting from DateTime64 RowBinary: truncate NaiveDateTime resulting from DateTime64 Jan 26, 2026
@ruslandoga
Copy link
Collaborator

Thank you!

@ruslandoga ruslandoga merged commit 62f09b5 into plausible:master Feb 2, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants