From 7057d5e270e771e1c6c6eb79c4cdcbd8e5f0ec83 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Wed, 17 Jul 2024 08:19:09 +0200 Subject: [PATCH] [3.12] gh-121871: Allow overriding docs build date with SOURCE_DATE_EPOCH (GH-121872) (#121887) 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 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'] -- 2.47.3