When falling back to uploaded date, create a date string that can be accepted by elasticsearch
This commit is contained in:
parent
02b428b776
commit
f8c6d74aaf
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue