From 06700865e1324fc33ae864a5114900cfc7dce6f5 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Mon, 16 Apr 2018 02:10:04 +0200 Subject: Allow build date to be overridden for reproducible documentation See https://reproducible-builds.org/specs/source-date-epoch/ for the definition of this variable. --- wscript | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'wscript') diff --git a/wscript b/wscript index 7236286..1e3c8af 100644 --- a/wscript +++ b/wscript @@ -184,7 +184,9 @@ def build_index(task): if date is None: import datetime - date = datetime.datetime.now().isoformat() + import time + now = int(os.environ.get('SOURCE_DATE_EPOCH', time.time())) + date = datetime.datetime.utcfromtimestamp(now).strftime('%F') subst_file(task.inputs[0].abspath(), task.outputs[0].abspath(), { '@ROWS@': ''.join(rows), -- cgit v1.2.1