8000 [3.13] gh-121871: Allow overriding docs build date with SOURCE_DATE_E… · python/cpython@7e5f6be · GitHub
[go: up one dir, main page]

Skip to content

Commit 7e5f6be

Browse files
[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>
1 parent f888636 commit 7e5f6be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Doc/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@
347347
}
348348

349349
# This 'Last updated on:' timestamp is inserted at the bottom of every page.
350-
html_last_updated_fmt = time.strftime('%b %d, %Y (%H:%M UTC)', time.gmtime())
350+
html_time = int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))
351+
html_last_updated_fmt = time.strftime('%b %d, %Y (%H:%M UTC)', time.gmtime(html_time))
351352

352353
# Path to find HTML templates.
353354
templates_path = ['tools/templates']

0 commit comments

Comments
 (0)
0