From 94af318b8903b9f533a13b492d08195afef35489 Mon Sep 17 00:00:00 2001 From: veclav talica Date: Tue, 23 May 2023 00:03:16 +0500 Subject: [PATCH] note that time is UTC --- tools/article_wrapper.py | 4 ++-- tools/main_page_generator.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/article_wrapper.py b/tools/article_wrapper.py index 4212a1a..2522a9a 100755 --- a/tools/article_wrapper.py +++ b/tools/article_wrapper.py @@ -27,13 +27,13 @@ if not brief is None: date = metadata.get("Date") if not date is None: - article_head += f"-- Created: *{MONTHS[date.tm_mon]} {date.tm_mday}, {date.tm_year}*\n\n" + article_head += f"-- Created: *{MONTHS[date.tm_mon]} {date.tm_mday}, {date.tm_year} UTC*\n\n" last_edit = metadata.get("Last Edit") if not last_edit is None: if date is None or last_edit.tm_mon != date.tm_mon or \ last_edit.tm_mday != date.tm_mday or last_edit.tm_year != date.tm_year: - article_head += f"-- Edited: *{MONTHS[last_edit.tm_mon]} {last_edit.tm_mday}, {last_edit.tm_year}*\n\n" + article_head += f"-- Edited: *{MONTHS[last_edit.tm_mon]} {last_edit.tm_mday}, {last_edit.tm_year} UTC*\n\n" # todo: Hyperlinks to appropriate tag pages. tags = metadata.get("Tags") diff --git a/tools/main_page_generator.py b/tools/main_page_generator.py index 768cad5..9e1b21e 100755 --- a/tools/main_page_generator.py +++ b/tools/main_page_generator.py @@ -40,6 +40,6 @@ for root, dirs, _ in walk(argv[1]): page += f""">*{','.join(metadata["Tags"])}*\n---\n""" curtime = time.gmtime(int(time.time())) -page += f"Last compiled: *{MONTHS[curtime.tm_mon]} {curtime.tm_mday}, {curtime.tm_year} {curtime.tm_hour}:{curtime.tm_min:02d}*\n\n" +page += f"Last compiled: *{MONTHS[curtime.tm_mon]} {curtime.tm_mday}, {curtime.tm_year} {curtime.tm_hour}:{curtime.tm_min:02d} UTC*\n\n" print(page_metadata + wrap_page(page))