Skip to content

Commit 3463fc3

Browse files
authored
Scripts: use datetime to get date and set timezone to UTC (#1410)
This will ensure the package is reproducible even in different timezones.
1 parent 64287ee commit 3463fc3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/gen-man.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"""
1010

1111
from json import load
12-
from datetime import date
12+
from datetime import datetime, timezone
1313
from time import time
1414
from re import search
1515
from os import environ, path
@@ -36,8 +36,10 @@
3636
titlePage = "Fastfetch man page"
3737
# date (center footer)
3838
# format : "Month (abbreviation) Day Year"
39-
todayDate = date.fromtimestamp(
40-
int(environ.get("SOURCE_DATE_EPOCH", time()))).strftime("%b %d %Y")
39+
todayDate = datetime.fromtimestamp(
40+
int(environ.get("SOURCE_DATE_EPOCH", time())),
41+
tz=timezone.utc,
42+
).strftime("%b %d %Y")
4143
# file to fastfetch version (left footer)
4244
pathToVersionFile = path.join(pathToCurrentDir, "../CMakeLists.txt")
4345

0 commit comments

Comments
 (0)