mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 19:53:17 +00:00
Update utils.py
Ooobs
This commit is contained in:
parent
b7914dd0d8
commit
99a8037959
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@ import re
|
|||
import requests
|
||||
import time
|
||||
import zipfile
|
||||
from datetime import datetime
|
||||
from datetime import datetime, timedelta
|
||||
from getpass import getpass
|
||||
from threading import Thread, Event
|
||||
from tqdm import tqdm
|
||||
|
@ -180,7 +180,7 @@ def toDatetime(value, format=None):
|
|||
else:
|
||||
# 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)
|
||||
value = datetime(1970, 1, 1) + timedelta(milliseconds=int(value))
|
||||
return value
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue