[3.13] gh-121871: Allow overriding docs build date with SOURCE_DATE_EPOCH (GH-121872) (#121888)

Co-authored-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
This commit is contained in:
Miss Islington (bot) 2024-07-17 08:12:12 +02:00 committed by GitHub
parent f888636182
commit 7e5f6be763
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -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']