Skip to content

Support RowBinary encoding for non-UTC DateTime timezones #353

@ruslandoga

Description

@ruslandoga

Ch.RowBinary.encoding_types/1 currently rejects DateTime and DateTime64 values with non-UTC timezone annotations:

Ch.RowBinary.encoding_types([{:datetime, "Europe/Vienna"}])
# ** (ArgumentError) can't encode DateTime with non-UTC timezone: "Europe/Vienna"

Ch.RowBinary.encoding_types([{:datetime64, 3, "Europe/Vienna"}])
# ** (ArgumentError) can't encode DateTime64 with non-UTC timezone: "Europe/Vienna"

These should be supported. The encoder should either correctly normalize values for the annotated timezone or otherwise handle ClickHouse timezone-qualified DateTime / DateTime64 types consistently with decoding.

Related PR coverage currently locks in the existing behavior so it is visible until this is implemented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions