From 12654a5b4a62c850189f5007b233d8f241070066 Mon Sep 17 00:00:00 2001 From: yariv-notion <170072766+yariv-notion@users.noreply.github.com> Date: Mon, 11 Nov 2024 15:59:33 -0800 Subject: [PATCH] Handle format issue with cleanup script Seems like HNY is storing dates in a different form from python iso. `ValueError: Invalid isoformat string: '2024-11-07T06:30:00Z'` --- tools/hny_dataset_cleanup_tool/hny-column-cleanup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/hny_dataset_cleanup_tool/hny-column-cleanup.py b/tools/hny_dataset_cleanup_tool/hny-column-cleanup.py index a390c04..fc6ba97 100755 --- a/tools/hny_dataset_cleanup_tool/hny-column-cleanup.py +++ b/tools/hny_dataset_cleanup_tool/hny-column-cleanup.py @@ -106,7 +106,7 @@ def list_columns_last_written_before(dataset, api_key, date): [ (column['id'], column['key_name']) for column in all_columns - if datetime.fromisoformat(column['last_written']).date() < date + if datetime.fromisoformat(column['last_written'].replace("Z", "+00:00")).date() < date ] )