mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 19:53:17 +00:00
fix datetime issue on windows.
This commit is contained in:
parent
15827022f3
commit
bd8949eeeb
1 changed files with 3 additions and 1 deletions
|
@ -178,7 +178,9 @@ def toDatetime(value, format=None):
|
|||
if format:
|
||||
value = datetime.strptime(value, format)
|
||||
else:
|
||||
value = datetime.fromtimestamp(int(value))
|
||||
# https://bugs.python.org/issue30684
|
||||
# And platform support for before epoch seems to be flaky.
|
||||
value = datetime.datetime(1970, 1, 1) + datetime.fromtimestamp(milliseconds=value)
|
||||
return value
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue