mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 19:53:17 +00:00
Merge pull request #345 from Tomme/ignore_negative_epoch_values
Ignore negative epoch values
This commit is contained in:
commit
e81809464f
1 changed files with 1 additions and 1 deletions
|
@ -181,7 +181,7 @@ def toDatetime(value, format=None):
|
|||
# https://bugs.python.org/issue30684
|
||||
# And platform support for before epoch seems to be flaky.
|
||||
# TODO check for others errors too.
|
||||
if int(value) == 0:
|
||||
if int(value) <= 0:
|
||||
value = 86400
|
||||
value = datetime.fromtimestamp(int(value))
|
||||
return value
|
||||
|
|
Loading…
Reference in a new issue