mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 11:43:13 +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:
|
||||
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