From 922021f621cdd102756f270f53af1a0e3c0efa88 Mon Sep 17 00:00:00 2001 From: Filipp Ozinov Date: Thu, 30 Jan 2025 12:03:14 +0000 Subject: [PATCH] Try fix handling wrong dates (#99) --- 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 = (