[Reproducible-commits] [diffoscope] 01/01: Force ppudump to output time in UTC via new TZ var

Jérémy Bobbio lunar at moszumanska.debian.org
Mon Nov 23 20:56:27 UTC 2015


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch master
in repository diffoscope.

commit 45de5a2fc7db33841e4c0222198f8059c4d0be3e
Author: anthraxx <levente at leventepolyak.net>
Date:   Mon Nov 23 21:23:29 2015 +0100

    Force ppudump to output time in UTC via new TZ var
    
    This includes the new feature of fpc to use the TZ environment
    variable to override the normal system timezone.
    
    This was implements in fpc r32369 (no release yet)
---
 diffoscope/comparators/ppu.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/diffoscope/comparators/ppu.py b/diffoscope/comparators/ppu.py
index 6ea7b44..d3b16f4 100644
--- a/diffoscope/comparators/ppu.py
+++ b/diffoscope/comparators/ppu.py
@@ -34,11 +34,13 @@ class Ppudump(Command):
 
     def env(self):
         # ppudump will return times using the local timezone which is not ideal
-        # to investigate files. Sadly, it doesn't support the TZ environment
-        # variable… but it looks for timezone definitions in the directory
+        # to investigate files. TZ environment variable can be used to enforce UTC.
+        # Currently there is no fpc release yet that includes the TC environment
+        # variable, but it looks for timezone definitions in the directory
         # specified by TZDIR. So let's set it to a non-existent directory
         # so we get UTC output even when the system timezone is set otherwise.
         env = dict(os.environ)
+        env['TZ'] = ':UTC'
         env['TZDIR'] = '/nonexistent'
         return env
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git



More information about the Reproducible-commits mailing list