From: Chris Lamb <lamby@debian.org>
Date: Wed, 28 Aug 2024 14:46:35 +0200
Subject: Make the build reproducible

Last-Update: 2024-04-25
---
 docs/conf.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/docs/conf.py b/docs/conf.py
index 2618e58..c4f4386 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -16,7 +16,13 @@
 
 import os
 import sys
-from datetime import datetime
+import time
+import datetime
+
+build_date = datetime.datetime.fromtimestamp(
+    int(os.environ.get('SOURCE_DATE_EPOCH', time.time())),
+    tz=datetime.timezone.utc,
+)
 
 sys.path.insert(0, os.path.abspath(".."))
 
@@ -24,10 +30,8 @@ import gvm  # noqa: E402
 
 # -- Project information -----------------------------------------------------
 
-year = datetime.now().year
-
 project = "python-gvm"
-copyright = f"2018 - {year}, Greenbone AG"
+copyright = f"2018 - {build_date.year}, Greenbone AG"
 author = "Greenbone AG"
 
 # The short X.Y version
