Open
Description
DateTime parsing defaults to using client zone (time.Local)
clickhouse-go/lib/column/datetime64.go
Line 314 in 8d87c23
I believe this was introduced in 0704ee8 ('align date and datetime handling with spec'); maybe earlier as #291 before that had mentioned 'it's better to use local timezone than UTC'
CLI client defaults to server timezone unless you specify --use_client_time_zone=true
, for example:
clickhouse client -h server.local -q "INSERT INTO a VALUES ('2025-02-07 00:00:00')"
TZ=CET clickhouse client -h server.local -q "INSERT INTO a VALUES ('2025-02-07 00:00:00')" --use_client_time_zone=true
clickhouse client -h server.local -q "SELECT * FROM a"
gets me only the second timestamp shifted into the CET timezone
Should the library match the CLI?
What is the specification mentioned in 0704ee8, maybe that would help explain the motivation?