diff options
author | nicolargo <nicolas@nicolargo.com> | 2020-10-10 10:12:13 +0200 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2020-10-10 10:12:13 +0200 |
commit | 57a804eb3c3039177ab16bd8cdc38e4e4af07880 (patch) | |
tree | 6ddf714291b8216cacace8393af0bfdfff6461a2 /docs/conf.py | |
parent | 44d7a806e5a026efef9c24acbc28574677a94389 (diff) |
Make build reproducible #1740
Diffstat (limited to 'docs/conf.py')
-rw-r--r-- | docs/conf.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/conf.py b/docs/conf.py index 54b5bc00..ade53f17 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -54,7 +54,10 @@ master_doc = 'index' # General information about the project. project = 'Glances' author = 'Nicolas Hennion' -year = datetime.now().year +try: + year = datetime.utcfromtimestamp(int(os.environ['SOURCE_DATE_EPOCH'])).year +except (KeyError, ValueError): + year = datetime.now().year copyright = '%d, %s' % (year, author) # The version info for the project you're documenting, acts as replacement for |