Description: add support for SOURCE_DATE_EPOCH
 Allow one to override the recorded build time by setting SOURCE_DATE_EPOCH
 in the environment. More details can be found on:
 https://reproducible-builds.org/specs/source-date-epoch/
Author: Jérémy Bobbio <lunar@debian.org>

--- libpgm-5.2.122~dfsg.orig/openpgm/pgm/version_generator.py
+++ libpgm-5.2.122~dfsg/openpgm/pgm/version_generator.py
@@ -4,8 +4,9 @@ import os
 import platform
 import time
 
-build_date = time.strftime ("%Y-%m-%d")
-build_time = time.strftime ("%H:%M:%S")
+timestamp = time.gmtime (int (os.getenv ('SOURCE_DATE_EPOCH', time.time ())))
+build_date = time.strftime ("%Y-%m-%d", timestamp)
+build_time = time.strftime ("%H:%M:%S", timestamp)
 build_rev = filter (str.isdigit, "$Revision: 1487 $")
 
 print """
