diff --git a/docs/conf.py b/docs/conf.py index 2cac97e36..283562b99 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,6 +1,7 @@ import datetime import os import sys +import time if sys.version_info >= (3, 11): import tomllib @@ -30,7 +31,9 @@ source_suffix = ".rst" master_doc = "index" project = project_data.get("name").upper() -year = datetime.datetime.now().date().year +year = datetime.datetime.fromtimestamp( + int(os.environ.get("SOURCE_DATE_EPOCH", time.time())), datetime.timezone.utc +).year copyright = f"2010–{year}" # noqa: RUF001 exclude_patterns = ["_build"] release = project_data.get("version")