From f8c6d74aaff2b7748e5b18bd7ecfa7d53a00c895 Mon Sep 17 00:00:00 2001 From: Craig Alexander Date: Wed, 3 Sep 2025 22:39:30 -0400 Subject: [PATCH] When falling back to uploaded date, create a date string that can be accepted by elasticsearch --- backend/download/src/queue.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/download/src/queue.py b/backend/download/src/queue.py index b81e68e4..a1c066d4 100644 --- a/backend/download/src/queue.py +++ b/backend/download/src/queue.py @@ -5,7 +5,7 @@ Functionality: """ import json -from datetime import datetime +from datetime import datetime, timezone from appsettings.src.config import AppConfig from channel.src.index import YoutubeChannel @@ -401,7 +401,7 @@ class PendingList(PendingIndex): return None upload_date_time = datetime.strptime(upload_date, "%Y%m%d") - published = upload_date_time.strftime("%Y-%m-%d") + published = upload_date_time.replace(tzinfo=timezone.utc).isoformat() return published