diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2023-11-24 07:29:28 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2023-11-24 08:02:00 +0300 |
commit | 778162c87fe52768297a4e767461054aa9c94dfe (patch) | |
tree | 01fb8c8a47a4ed9024449295a80df8b61ad9dc63 /contrib/python/clickhouse-connect/clickhouse_connect | |
parent | 7ca783ae1c82067d566b9b73e3f67dff078401bc (diff) | |
download | ydb-778162c87fe52768297a4e767461054aa9c94dfe.tar.gz |
Update contrib/python/clickhouse-connect to 0.6.20
Diffstat (limited to 'contrib/python/clickhouse-connect/clickhouse_connect')
-rw-r--r-- | contrib/python/clickhouse-connect/clickhouse_connect/__version__.py | 2 | ||||
-rw-r--r-- | contrib/python/clickhouse-connect/clickhouse_connect/driver/query.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py b/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py index 3b0f77b522..61f0ae1784 100644 --- a/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py +++ b/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py @@ -1 +1 @@ -version = '0.6.19' +version = '0.6.20' diff --git a/contrib/python/clickhouse-connect/clickhouse_connect/driver/query.py b/contrib/python/clickhouse-connect/clickhouse_connect/driver/query.py index c4a48aafe0..3fb5aa7dac 100644 --- a/contrib/python/clickhouse-connect/clickhouse_connect/driver/query.py +++ b/contrib/python/clickhouse-connect/clickhouse_connect/driver/query.py @@ -391,8 +391,8 @@ def format_query_value(value: Any, server_tz: tzinfo = pytz.UTC): if isinstance(value, str): return format_str(value) if isinstance(value, datetime): - if value.tzinfo is None: - value = value.replace(tzinfo=server_tz) + if value.tzinfo is not None or server_tz != pytz.UTC: + value = value.astimezone(server_tz) return f"'{value.strftime('%Y-%m-%d %H:%M:%S')}'" if isinstance(value, date): return f"'{value.isoformat()}'" |