cloudbeaver icon indicating copy to clipboard operation
cloudbeaver copied to clipboard

clickhouse Driver Properties timezone config is not valid

Open frank-lam opened this issue 3 years ago • 2 comments

when config cloudbeaver - clickhouse's Driver Properties as following, but select now() result is UTC time not Asia/Shanghai time. I suspect the time zone configuration is not working.

use_client_time_zone = false
use_server_time_zone = false
use_server_time_zone_for_dates = false
use_time_zone = Asia/Shanghai

when I config this properties on the dbeaver desktop client, it working!

frank-lam avatar Oct 27 '21 02:10 frank-lam

Thank you for the report.

kseniiaguzeeva avatar Oct 27 '21 10:10 kseniiaguzeeva

I've made some investigations and it looks like the reason is in Clickhouse driver limitation https://github.com/ClickHouse/ClickHouse/issues/699. The time is changed in CloudBeaver after setting your parameters, but it's not equel to real Shanghai time. It means that settings are applied via CloudBeaver.

As a workaround, you can explicitly change the timezone in queries https://clickhouse.com/docs/en/sql-reference/functions/date-time-functions/#totimezone

kseniiaguzeeva avatar Nov 15 '21 09:11 kseniiaguzeeva

https://github.com/ClickHouse/ClickHouse/issues/699 is closed. And I can’t reproduce this issue again. Clickhouse works fine as well.

Feel free to contact me to reopen the ticket if it's still actual. And thank you for the interest in CloudBeaver :)

TatyanaSsau avatar Jun 12 '23 08:06 TatyanaSsau