8000 gh-121871: Allow overriding docs build date with SOURCE_DATE_EPOCH (#… · python/cpython@941b3b7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 941b3b7

Browse files
authored
gh-121871: Allow overriding docs build date with SOURCE_DATE_EPOCH (#121872)
1 parent f036a46 commit 941b3b7

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