Skip to content

Commit 563ed58

Browse files
authored
Scripts: gen-man.py honors SOURCE_DATE_EPOCH. (#1400)
1 parent b8ec070 commit 563ed58

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scripts/gen-man.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010

1111
from json import load
1212
from datetime import date
13+
from time import time
1314
from re import search
14-
from os import path
15+
from os import environ, path
1516

1617

1718
###### Text Decorations Tags ######
@@ -34,7 +35,9 @@
3435
# title (center header)
3536
titlePage = "Fastfetch man page"
3637
# date (center footer)
37-
todayDate = date.today().strftime("%b %d %Y") # format : "Month (abbreviation) Day Year"
38+
# format : "Month (abbreviation) Day Year"
39+
todayDate = date.fromtimestamp(
40+
int(environ.get("SOURCE_DATE_EPOCH", time()))).strftime("%b %d %Y")
3841
# file to fastfetch version (left footer)
3942
pathToVersionFile = path.join(pathToCurrentDir, "../CMakeLists.txt")
4043

0 commit comments

Comments
 (0)