Skip to content

HTML infers copyright date instead of using today from conf.py #3451

@nmattia

Description

@nmattia

Subject:

Problem

  • The HTML builder doesn't not seem to rely on 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.

Procedure to reproduce the problem

In a nix-shell with python35.withPackages (ps: with ps; [ sphinx ]);, build documentation with sphinx's generated makefile:

$ nix-shell --pure --run "make html"

Error logs / results

The HTML shows a copyright notice from year 1970.

Expected results

The HTML shows a copyright notice with the current year or the year defined in conf.py's today.

Environment info

  • OS: Linux with nix package manager
  • Python version: 3.5 (nix: python35.withPackages (ps: with ps; [ sphinx ]);)
  • Sphinx version: 1.5.2 (nix: python35.withPackages (ps: with ps; [ sphinx ]);)
  • Nixpkgs commit deec3c1dae62e8345451cd8c4ad41134ab95e88d

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions