summaryrefslogtreecommitdiffstats
path: root/tools/update_metainfo.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/update_metainfo.py')
-rwxr-xr-xtools/update_metainfo.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/update_metainfo.py b/tools/update_metainfo.py
index 694c6244c1..bf01ed82f7 100755
--- a/tools/update_metainfo.py
+++ b/tools/update_metainfo.py
@@ -23,12 +23,15 @@ def parse_changelog(content):
"version": matchobj.group("number"),
}
try:
- attrib["date"] = datetime.datetime.strptime(
+ release_date = datetime.datetime.strptime(
matchobj.group("date"), " (%Y-%m-%d)"
- ).strftime("%Y-%m-%d")
- attrib["type"] = "stable"
+ ).replace(tzinfo=datetime.timezone.utc)
except ValueError:
attrib["type"] = "development"
+ else:
+ attrib["type"] = "stable"
+ attrib["date"] = release_date.strftime("%Y-%m-%d")
+ attrib["timestamp"] = "{:.0f}".format(release_date.timestamp())
soup = bs4.BeautifulSoup(
markdown.markdown(description_md), "html.parser"