diff options
author | Bernhard M. Wiedemann <bwiedemann@suse.de> | 2024-07-17 05:34:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-17 05:34:00 (GMT) |
commit | 941b3b7f4473153bf99f4c47e99f34f7aefe51ac (patch) | |
tree | 564d409d91636f6ee532ac61471b00b52a494bee | |
parent | f036a463dbc43d25712183dc6afa4e38c1aaf93d (diff) | |
download | cpython-941b3b7f4473153bf99f4c47e99f34f7aefe51ac.zip cpython-941b3b7f4473153bf99f4c47e99f34f7aefe51ac.tar.gz cpython-941b3b7f4473153bf99f4c47e99f34f7aefe51ac.tar.bz2 |
gh-121871: Allow overriding docs build date with SOURCE_DATE_EPOCH (#121872)
-rw-r--r-- | Doc/conf.py | 3 |
1 files changed, 2 insertions, 1 deletions
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'] |