On Sat, Mar 04, 2023 at 01:17:55PM +0200, Faidon Liambotis wrote: > I checked the Sphinx source code, and it looks like the string is used > in prepare_writing() from builders/html/__init__.py, which in turn > passes it on as an argument to format_date() from util/i18n.py. It looks > like format_date() has support for SOURCE_DATE_EPOCH. > > So from what I can tell, a much simpler patch would be to set > html_last_updated_fmt to "%Y-%m-%dT%H:%M:%S.%f" for the equivalent ISO > 8601 string (or even something with less accuracy) -- no need to fiddle > with the datetime module, or SOURCE_DATE_EPOCH at all.
I submitted a PR and fixed this issue upstream in both pyproject-api and tox. The former was included in the 1.5.1 release, which I'll upload shortly. Regards, Faidon