1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
From: Georges Khaznadar <georgesk@debian.org>
Date: Sun, 5 Oct 2025 20:50:36 +0200
Subject: Enable reproducible building
- Remove timestamp from documentation
- When generating PDF files, honour SOURCE_DATE_EPOCH for timestamps in
metadata: https://reproducible-builds.org/specs/source-date-epoch/
- Interpret timestamps in generated PDF files as UTC.
---
docs/userguide/ch1_intro.py | 1 -
src/reportlab/pdfbase/pdfdoc.py | 4 ++--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/docs/userguide/ch1_intro.py b/docs/userguide/ch1_intro.py
index bd549ab..754efcd 100644
--- a/docs/userguide/ch1_intro.py
+++ b/docs/userguide/ch1_intro.py
@@ -9,7 +9,6 @@ from reportlab.lib.utils import TimeStamp
title("ReportLab PDF Library")
title("User Guide")
centred('ReportLab Version ' + reportlab.Version)
-centred(TimeStamp().datetime.strftime('Document generated on %Y/%m/%d %H:%M:%S %Z'))
nextTemplate("TOC")
diff --git a/src/reportlab/pdfbase/pdfdoc.py b/src/reportlab/pdfbase/pdfdoc.py
index 4c61768..7475e78 100755
--- a/src/reportlab/pdfbase/pdfdoc.py
+++ b/src/reportlab/pdfbase/pdfdoc.py
@@ -1767,8 +1767,8 @@ class PDFDate(PDFObject):
def format(self, doc):
dfmt = self.dateFormatter or (
lambda yyyy,mm,dd,hh,m,s:
- "D:%04d%02d%02d%02d%02d%02d%+03d'%02d'"
- % (yyyy,mm,dd,hh,m,s,self.dhh,self.dmm))
+ "D:%04d%02d%02d%02d%02d%02d+00'00'"
+ % (yyyy,mm,dd,hh,m,s))
return format(PDFString(dfmt(*self.date)), doc)
class Destination(PDFObject):
|