Subject:
conf.py's today value for setting the date. This is apparent when the copyright is displayed at the bottom of the page. Not only might the user not want to use the current system date for the copyright notice, but some systems (like nix) hard code the SOURCE_DATE_EPOCH environment variable (used indirectly by the HTML builder) to allow for reproducible builds. In this case, copyright will be stuck in the year 1970.The use of SOURCE_DATE_EPOCH comes from the util/i18n.py module.
In a nix-shell with python35.withPackages (ps: with ps; [ sphinx ]);, build documentation with sphinx's generated makefile:
$ nix-shell --pure --run "make html"
The HTML shows a copyright notice from year 1970.
The HTML shows a copyright notice with the current year _or_ the year defined in conf.py's today.
python35.withPackages (ps: with ps; [ sphinx ]);)python35.withPackages (ps: with ps; [ sphinx ]);)deec3c1dae62e8345451cd8c4ad41134ab95e88dSorry, I don't know about "nix". But Sphinx does not use today for the last updated.
today is used only for the substitution in reST notation.
These values determine how to format the current date, used as the replacement for |today|.
http://www.sphinx-doc.org/en/stable/config.html#confval-today
I think your expectation is wrong.
Any updates?
I think this is not a bug of sphinx.
So I'd like to close this.
Not relevant to me anymore, happy to close. Thanks for your input.
In case someone else ends up here, this probably was a nix-specific issue. Nix sets SOURCE_DATE_EPOCH to "1" (1970-01-01T00:00:01Z) so that the nix goal of "totally reproducible builds" is met. One must explicitly set SOURCE_DATE_EPOCH to something more relevant.
One can set it in the generated Makefile like this:
@@ -7,3 +7,4 @@ SPHINXBUILD = sphinx-build
SPHINXPROJ = InventoryAdministration
SOURCEDIR = .
BUILDDIR = _build
+SOURCE_DATE_EPOCH = $(shell git log -1 --format=%ct)
Came here from Google to say thank you @Balletie, worked perfectly - you're helping Nix-users everywhere.
thanks :)
Most helpful comment
One can set it in the generated Makefile like this: