From ab475eeed21b1a17334a8b0cd1fe289ecb08b180 Mon Sep 17 00:00:00 2001 From: Filipp Ozinov Date: Thu, 30 Jan 2025 15:59:24 +0400 Subject: [PATCH] Try fix handling wrong dates --- mysql_ch_replicator/clickhouse_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql_ch_replicator/clickhouse_api.py b/mysql_ch_replicator/clickhouse_api.py index e521b43..4e57f53 100644 --- a/mysql_ch_replicator/clickhouse_api.py +++ b/mysql_ch_replicator/clickhouse_api.py @@ -192,7 +192,7 @@ def insert(self, table_name, records, table_structure: TableStructure = None): try: e.timestamp() except ValueError: - e = 0 + e = datetime.datetime(1970, 1, 1) if table_structure is not None: field: TableField = table_structure.fields[i] is_datetime = (