Attached is the patch I submitted upstream.
commit 88d05720508ea7382b2a6e7cd1691ea6c83f70e4
Author: Jelmer Vernooij <[email protected]>
Date: Sun Dec 6 11:38:11 2015 +0000
Use build time from SOURCE_DATE_EPOCH environment variable, if set.
See https://reproducible-builds.org/specs/source-date-epoch/ for background.
diff --git a/pydoctor/driver.py b/pydoctor/driver.py
index 0389c0e..58469b9 100644
--- a/pydoctor/driver.py
+++ b/pydoctor/driver.py
@@ -296,6 +296,16 @@ def main(args):
else:
options.makehtml = False
+ # Support source date epoch:
+ # https://reproducible-builds.org/specs/source-date-epoch/
+ try:
+ system.buildtime = datetime.datetime.utcfromtimestamp(
+ int(os.environ['SOURCE_DATE_EPOCH']))
+ except ValueError, e:
+ error(e)
+ except KeyError:
+ pass
+
if options.buildtime:
try:
system.buildtime = datetime.datetime.strptime(