1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-25 15:33:39 +00:00

Merge pull request #7394 from helmutg/reproducible-docs

Make timestamps in manual pages reproducible
This commit is contained in:
TW 2023-02-28 12:13:19 +01:00 committed by GitHub
commit e1fd24aa6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,6 +7,7 @@
import textwrap import textwrap
from collections import OrderedDict from collections import OrderedDict
from datetime import datetime from datetime import datetime
import time
from setuptools import Command from setuptools import Command
@ -470,7 +471,10 @@ def write_man_header(self, write, title, description):
self.write_heading(write, description, double_sided=True) self.write_heading(write, description, double_sided=True)
# man page metadata # man page metadata
write(":Author: The Borg Collective") write(":Author: The Borg Collective")
write(":Date:", datetime.utcnow().date().isoformat()) write(
":Date:",
datetime.utcfromtimestamp(int(os.environ.get("SOURCE_DATE_EPOCH", time.time()))).date().isoformat(),
)
write(":Manual section: 1") write(":Manual section: 1")
write(":Manual group: borg backup tool") write(":Manual group: borg backup tool")
write() write()