From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 17 Jul 2024 06:19:09 +0000 (+0200) Subject: [3.12] gh-121871: Allow overriding docs build date with SOURCE_DATE_EPOCH (GH-121872... X-Git-Tag: v3.12.5~101 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7057d5e270e771e1c6c6eb79c4cdcbd8e5f0ec83;p=thirdparty%2FPython%2Fcpython.git [3.12] gh-121871: Allow overriding docs build date with SOURCE_DATE_EPOCH (GH-121872) (#121887) Co-authored-by: Bernhard M. Wiedemann --- diff --git a/Doc/conf.py b/Doc/conf.py index cf21ea97e711..3db65df7a84b 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -331,7 +331,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']