File: 11-reproducible-build.diff

package info (click to toggle)
elinks 0.13.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 17,808 kB
  • sloc: ansic: 104,839; sh: 5,343; python: 3,917; perl: 2,175; pascal: 1,562; makefile: 974; javascript: 368; yacc: 295; lisp: 125; ruby: 70; awk: 65
file content (23 lines) | stat: -rw-r--r-- 1,025 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Description: Make the build reproducible
Author: Chris Lamb <lamby@debian.org>
Last-Update: 2020-05-11
Bug-Debian: https://bugs.debian.org/960313

--- elinks-0.13.1.orig/doc/tools/asciidoc/asciidoc.py
+++ elinks-0.13.1/doc/tools/asciidoc/asciidoc.py
@@ -1061,13 +1061,9 @@ class Document:
         self.safe = True        # Default safe mode.
     def init_attrs(self):
         # Set implicit attributes.
-        d = time.localtime(time.time())
+        d = time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))
         self.attributes['localdate'] = time.strftime('%d-%b-%Y',d)
-        s = time.strftime('%H:%M:%S',d)
-        if time.daylight:
-            self.attributes['localtime'] = s + ' ' + time.tzname[1]
-        else:
-            self.attributes['localtime'] = s + ' ' + time.tzname[0]
+        s = time.strftime('%H:%M:%S %z',d)
         self.attributes['asciidoc-version'] = VERSION
         self.attributes['backend'] = document.backend
         self.attributes['doctype'] = document.doctype