From 34143da2746ac63ba5429eddf1df85988324db78 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Wed, 17 Jul 2024 07:34:00 +0200 Subject: [PATCH] gh-121871: Allow overriding docs build date with SOURCE_DATE_EPOCH (GH-121872) (cherry picked from commit 941b3b7f4473153bf99f4c47e99f34f7aefe51ac) Co-authored-by: Bernhard M. Wiedemann --- Doc/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/conf.py b/Doc/conf.py index 29b1b2db32718b..6ab8e8ccbdfd96 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -347,7 +347,8 @@ } # This 'Last updated on:' timestamp is inserted at the bottom of every page. -html_last_updated_fmt = time.strftime('%b %d, %Y (%H:%M UTC)', time.gmtime()) +html_time = int(os.environ.get('SOURCE_DATE_EPOCH', time.time())) +html_last_updated_fmt = time.strftime('%b %d, %Y (%H:%M UTC)', time.gmtime(html_time)) # Path to find HTML templates. templates_path = ['tools/templates']