From: Bernhard M. Wiedemann Date: Wed, 17 Jul 2024 05:34:00 +0000 (+0200) Subject: gh-121871: Allow overriding docs build date with SOURCE_DATE_EPOCH (#121872) X-Git-Tag: v3.14.0a1~1096 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=941b3b7f4473153bf99f4c47e99f34f7aefe51ac;p=thirdparty%2FPython%2Fcpython.git gh-121871: Allow overriding docs build date with SOURCE_DATE_EPOCH (#121872) --- diff --git a/Doc/conf.py b/Doc/conf.py index 29b1b2db3271..6ab8e8ccbdfd 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -347,7 +347,8 @@ html_context = { } # 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']