From 4fbd22932bce9a94120258c84e902208cf6d3a34 Mon Sep 17 00:00:00 2001 From: Alexandra Kirk Date: Mon, 25 Nov 2024 16:50:30 -0700 Subject: [PATCH] let ingest api handle datetime validation and just pass through inputs in collection generation dag --- dags/veda_data_pipeline/utils/collection_generation.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dags/veda_data_pipeline/utils/collection_generation.py b/dags/veda_data_pipeline/utils/collection_generation.py index abba2de5..a5f0eeb2 100644 --- a/dags/veda_data_pipeline/utils/collection_generation.py +++ b/dags/veda_data_pipeline/utils/collection_generation.py @@ -102,9 +102,8 @@ def create_cog_collection(self, dataset: Dict[str, Any]) -> dict: if temporal_extent := dataset.get("temporal_extent"): collection_stac["extent"]["temporal"] = { "interval": [ - # most of our data uses the Z suffix for UTC - isoformat() doesn't [ - datetime.fromisoformat(x).astimezone(timezone.utc).isoformat().replace("+00:00", "Z") + x if x else None for x in list(temporal_extent.values()) ]