diff --git a/data_registry/process_manager/task/process.py b/data_registry/process_manager/task/process.py index d99247e..0034425 100644 --- a/data_registry/process_manager/task/process.py +++ b/data_registry/process_manager/task/process.py @@ -16,10 +16,16 @@ def url_for_collection(*parts): def parse_date(dt): if dt: - # nigeria_ebonyi_state + # 2023-10-27T17:14:07:00Z nigeria_ebonyi_state + # ^^^ if dt.endswith("Z") and dt.count(":") == 3: dt = ".".join(dt.rsplit(":", 1)) + # 2024-05-01 16:30:04.160T12:00:00Z italy_anac + # ^^^^^^^^^ + if " " in dt and "T12:00:00" in dt: + dt = dt.replace("T12:00:00", "").replace(" ", "T") + if len(dt) == 10: return datetime.strptime(dt, "%Y-%m-%d").date() elif "." in dt: