mirror of
https://github.com/9001/copyparty.git
synced 2025-10-05 19:42:29 +02:00
fix timezone in search, zipfiles, fuse
This commit is contained in:
parent
e7cd922d8b
commit
715401ca8e
5 changed files with 15 additions and 11 deletions
|
@ -45,6 +45,7 @@ import threading
|
|||
import traceback
|
||||
import http.client # py2: httplib
|
||||
import urllib.parse
|
||||
import calendar
|
||||
from datetime import datetime
|
||||
from urllib.parse import quote_from_bytes as quote
|
||||
from urllib.parse import unquote_to_bytes as unquote
|
||||
|
@ -443,7 +444,7 @@ class Gateway(object):
|
|||
ts = 60 * 60 * 24 * 2
|
||||
try:
|
||||
sz = int(fsize)
|
||||
ts = datetime.strptime(fdate, "%Y-%m-%d %H:%M:%S").timestamp()
|
||||
ts = calendar.timegm(time.strptime(fdate, "%Y-%m-%d %H:%M:%S"))
|
||||
except:
|
||||
info("bad HTML or OS [{}] [{}]".format(fdate, fsize))
|
||||
# python cannot strptime(1959-01-01) on windows
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue