This commit is contained in:
jxxghp 2024-04-22 09:54:51 +08:00
parent 750c4441db
commit 316f61bf69

View File

@ -743,7 +743,7 @@ class StringUtils:
try:
time_obj = datetime.datetime.strptime(time_str, '%Y-%m-%d %H:%M:%S')
except ValueError:
return ''
return time_str
now = datetime.datetime.now()
diff = time_obj - now
diff_seconds = diff.seconds