Skip to content

Commit

Permalink
Handle new date format from TMDB
Browse files Browse the repository at this point in the history
  • Loading branch information
chazlarson authored Dec 6, 2024
1 parent ab199f8 commit a466e26
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tmdbapis/tmdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a466e26

Please sign in to comment.