From a466e268d24371e60c232be3014bd51404cbf2e4 Mon Sep 17 00:00:00 2001 From: Chaz Larson Date: Fri, 6 Dec 2024 16:12:32 -0600 Subject: [PATCH] Handle new date format from TMDB --- tmdbapis/tmdb.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tmdbapis/tmdb.py b/tmdbapis/tmdb.py index 2f06252..0b1d312 100644 --- a/tmdbapis/tmdb.py +++ b/tmdbapis/tmdb.py @@ -186,6 +186,8 @@ def _parse(self, data=None, attrs: Optional[Union[str, list]] = None, value_type elif value_type == "date": if not value: return None + elif " UT" in value: + return datetime.strptime(value[:-1].split(".")[0], "%Y-%m-%d %H:%M:%S UT") elif "T" in value: return datetime.strptime(value[:-1].split(".")[0], "%Y-%m-%dT%H:%M:%S") else: