Skip to content

Commit

Permalink
Fix some error thrown by the logss
Browse files Browse the repository at this point in the history
  • Loading branch information
nattadasu committed Aug 29, 2023
1 parent 809ca78 commit dc847d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions extensions/relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ async def relations_shows(
trakt_id = None
trakt_season = None
trakt_type = None
simkl_id = None
simkl_dat = SimklRelations()
trakt_data = TraktMediaStruct("", 0, TraktIdsStruct(0, ""))

Expand Down
4 changes: 3 additions & 1 deletion modules/commons.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ def save_traceback_to_file(
raise error


def custom_datetime_converter(time: str, zone: str = "Z"):
def custom_datetime_converter(time: str, zone: str = "Z", remove_millis: bool = True):
"""
Converts inconventional datetime into ISO standard
Expand All @@ -547,6 +547,8 @@ def custom_datetime_converter(time: str, zone: str = "Z"):
datetime: formatted datetime
"""
time = time.replace(zone, '+00:00')
if remove_millis:
time = re.sub(r'\.[\d]+', '', time)
return datetime.fromisoformat(time)


Expand Down

0 comments on commit dc847d2

Please sign in to comment.