From 9d75c542713b034b76abb6f4c33a3cacc20eb480 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 31 May 2020 12:55:08 +0100 Subject: [PATCH] Last modified days since epoch --- webinterface.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webinterface.py b/webinterface.py index c883364d9..112f38450 100644 --- a/webinterface.py +++ b/webinterface.py @@ -5739,7 +5739,8 @@ def htmlHashTagSwarm(baseDir: str, actor: str) -> str: tagsFilename = os.path.join(baseDir + '/tags', f) if not os.path.isfile(tagsFilename): continue - lastModifiedDate = os.stat(tagsFilename) + modTimesinceEpoc = os.path.getmtime(tagsFilename) + lastModifiedDate = datetime.fromtimestamp(modTimesinceEpoc) fileDaysSinceEpoch = (lastModifiedDate - datetime(1970, 1, 1)).days if fileDaysSinceEpoch < maxDaysSinceEpoch: removeHashtags.append(tagsFilename)