note that time is UTC
This commit is contained in:
parent
969d7ee5c1
commit
94af318b89
@ -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")
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user