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:
commit
e1fd24aa6e
1 changed files with 5 additions and 1 deletions
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue