mirror of
https://github.com/9001/copyparty.git
synced 2026-09-24 13:50:16 +01:00
clamp lastmod to y6325 (closes #1470);
fromtimestamp fails on year>9999
This commit is contained in:
+4
-3
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
from __future__ import print_function, unicode_literals
|
||||
|
||||
S_VERSION = "2.20"
|
||||
S_BUILD_DT = "2026-04-22"
|
||||
S_VERSION = "2.21"
|
||||
S_BUILD_DT = "2026-05-25"
|
||||
|
||||
"""
|
||||
u2c.py: upload to copyparty
|
||||
@@ -1311,7 +1311,8 @@ class Ctl(object):
|
||||
if self.ar.jw:
|
||||
print("%s %s" % (wark, vp))
|
||||
else:
|
||||
zd = datetime.datetime.fromtimestamp(max(0, file.lmod), UTC)
|
||||
tsdt = datetime.datetime.fromtimestamp
|
||||
zd = tsdt(max(0, min(2 << 36, file.lmod)), UTC)
|
||||
dt = "%04d-%02d-%02d %02d:%02d:%02d" % (
|
||||
zd.year,
|
||||
zd.month,
|
||||
|
||||
Reference in New Issue
Block a user