Skip to content

Commit 7057d5e

Browse files
[3.12] gh-121871: Allow overriding docs build date with SOURCE_DATE_EPOCH (GH-121872) (#121887)
Co-authored-by: Bernhard M. Wiedemann <[email protected]>
1 parent 9d996b5 commit 7057d5e

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
@@ -331,7 +331,8 @@
331331
}
332332

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

336337
# Path to find HTML templates.
337338
templates_path = ['tools/templates']

0 commit comments

Comments
 (0)