diff options
Diffstat (limited to 'update_latest.py')
-rw-r--r-- | update_latest.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/update_latest.py b/update_latest.py index 160dc7c..94bf5a2 100644 --- a/update_latest.py +++ b/update_latest.py @@ -1,6 +1,7 @@ import os import subprocess -from time import mktime, ctime +from time import mktime +from datetime import date from email.utils import parsedate def file_last_modified(path): @@ -35,7 +36,8 @@ for f, t in sorted(updates.items(), key=lambda x: x[1], reverse=True)[:10]: #print(f, ctime(t), sep="\t") - print(f"\t<li><a href={f}>{f.split()[-1]}</a> - Updated: {ctime(t)}</li>") + if f != "latest.html": + print(f"\t<li><a href=/{f}>{f.split()[-1]}</a> - Updated: {date.fromtimestamp(t)}</li>") print("</ul>") print("</body>") |