mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Fix variable names
This commit is contained in:
parent
1d02fccce6
commit
7efc6f9b6a
1 changed files with 4 additions and 4 deletions
|
@ -478,13 +478,13 @@ def convert_to_local(date):
|
||||||
'''
|
'''
|
||||||
try:
|
try:
|
||||||
date = parser.parse(date) if isinstance(date, string_types) else date
|
date = parser.parse(date) if isinstance(date, string_types) else date
|
||||||
parsed_date = date.replace(tzinfo=tz.tzutc())
|
date = date.replace(tzinfo=tz.tzutc())
|
||||||
local_date = parsed_date.astimezone(tz.tzlocal())
|
date = date.astimezone(tz.tzlocal())
|
||||||
# Bad metadata defaults to date 1-1-1. Catch it and don't throw errors
|
# Bad metadata defaults to date 1-1-1. Catch it and don't throw errors
|
||||||
if local_date.year == 1:
|
if date.year == 1:
|
||||||
return str(date)
|
return str(date)
|
||||||
else:
|
else:
|
||||||
return local_date.strftime('%Y-%m-%dT%H:%M:%S')
|
return date.strftime('%Y-%m-%dT%H:%M:%S')
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
LOG.exception('Item date: {} --- {}'.format(str(date), error))
|
LOG.exception('Item date: {} --- {}'.format(str(date), error))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue