Update utils.py

Ooobs
This commit is contained in:
Hellowlol 2019-01-21 21:50:42 +01:00 committed by GitHub
parent b7914dd0d8
commit 99a8037959
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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