Last modified days since epoch

main
Bob Mottram 2020-05-31 12:55:08 +01:00
parent 9dd77fa4e1
commit 9d75c54271
1 changed files with 2 additions and 1 deletions

View File

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