From 7e5f6be763a6a3793dc2de1aecd138ca8776c38f Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Wed, 17 Jul 2024 08:12:12 +0200 Subject: [3.13] gh-121871: Allow overriding docs build date with SOURCE_DATE_EPOCH (GH-121872) (#121888) 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 29b1b2d..6ab8e8c 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'] -- cgit v0.12