mirror of
https://github.com/pkkid/python-plexapi
synced 2025-02-16 21:08:27 +00:00
Merge pull request #332 from pkkid/fix_276
fix datetime issue on windows.
This commit is contained in:
commit
b7914dd0d8
1 changed files with 3 additions and 1 deletions
|
@ -178,7 +178,9 @@ def toDatetime(value, format=None):
|
||||||
if format:
|
if format:
|
||||||
value = datetime.strptime(value, format)
|
value = datetime.strptime(value, format)
|
||||||
else:
|
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
|
return value
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue