Improve logging for converting Unix timestamps
This commit is contained in:
parent
2477040375
commit
2a06103eba
1 changed files with 4 additions and 3 deletions
|
@ -33,10 +33,11 @@ def unix_date_to_kodi(unix_kodi_time):
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
return strftime('%Y-%m-%d %H:%M:%S', localtime(float(unix_kodi_time)))
|
return strftime('%Y-%m-%d %H:%M:%S', localtime(float(unix_kodi_time)))
|
||||||
except:
|
except Exception as exception:
|
||||||
LOG.error('Received an illegal timestamp from Plex: %s. '
|
LOG.error(exception)
|
||||||
|
LOG.error('Received an illegal timestamp from Plex: %s, type %s. '
|
||||||
'Using 1970-01-01 12:00:00',
|
'Using 1970-01-01 12:00:00',
|
||||||
unix_kodi_time)
|
unix_kodi_time, type(unix_kodi_time))
|
||||||
return '1970-01-01 12:00:00'
|
return '1970-01-01 12:00:00'
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue