Hi,

Updated patch attached so it does not FTBFS if SOURCE_DATE_EPOCH env is
not set. Thanks to Val Lorentz.


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
diff --git a/pagekite/compat.py b/pagekite/compat.py
index fe3da9e..2537953 100755
--- a/pagekite/compat.py
+++ b/pagekite/compat.py
@@ -50,7 +50,7 @@ try:
   import datetime
   ts_to_date = datetime.datetime.fromtimestamp
   def ts_to_iso(ts=None):
-    return datetime.datetime.fromtimestamp(ts).isoformat()
+    return datetime.datetime.utcfromtimestamp(ts).isoformat()
 except ImportError:
   ts_to_date = str
   ts_to_iso = str
diff --git a/pagekite/manual.py b/pagekite/manual.py
index 5ff20f1..13399c7 100755
--- a/pagekite/manual.py
+++ b/pagekite/manual.py
@@ -2,6 +2,7 @@
 """
 The program manual!
 """
+import os
 import re
 import time
 
@@ -447,7 +448,7 @@ def MAN(pname=None):
 .TH PAGEKITE "1" "%s" "https://pagekite.net/"; "Awesome Commands"
 .nh
 .ad l
-""") % ts_to_iso(time.time()).split('T')[0]
+""") % ts_to_iso(float(os.environ.get('SOURCE_DATE_EPOCH', 
time.time()))).split('T')[0]
   for h, section, text in MANUAL_TOC:
     man += ('.%s %s\n\n%s\n\n'
             ) % (h, h == 'SH' and section.upper() or section,

Reply via email to