diff --git a/dags/hivemind_etl_helpers/src/db/telegram/transform/summary.py b/dags/hivemind_etl_helpers/src/db/telegram/transform/summary.py index 9bd387e2..bf934b9d 100644 --- a/dags/hivemind_etl_helpers/src/db/telegram/transform/summary.py +++ b/dags/hivemind_etl_helpers/src/db/telegram/transform/summary.py @@ -1,4 +1,4 @@ -from datetime import date, timedelta +from datetime import date, datetime, timedelta, timezone from llama_index.core import Document @@ -32,7 +32,9 @@ def transform(self, summaries: dict[date, str]) -> list[Document]: + (day + timedelta(days=1)).strftime("%Y-%m-%d"), text=summary, metadata={ - "date": day, + "date": datetime.combine( + day, datetime.min.time(), tzinfo=timezone.utc + ), }, ) summary_docs.append(document)