[Reproducible-commits] [strip-nondeterminism] 01/01: set timezone to UTC before normalizing to get reproducible timestamps

Reiner Herrmann deki-guest at moszumanska.debian.org
Fri Feb 27 22:01:10 UTC 2015


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

deki-guest pushed a commit to branch master
in repository strip-nondeterminism.

commit ec6b0577822bc3a7f0e3bcc6bbd5515ffc56f451
Author: Reiner Herrmann <reiner at reiner-h.de>
Date:   Fri Feb 27 22:59:23 2015 +0100

    set timezone to UTC before normalizing to get reproducible timestamps
---
 bin/dh_strip_nondeterminism | 4 ++++
 bin/strip-nondeterminism    | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/bin/dh_strip_nondeterminism b/bin/dh_strip_nondeterminism
index 4b15039..01b4ad7 100755
--- a/bin/dh_strip_nondeterminism
+++ b/bin/dh_strip_nondeterminism
@@ -11,6 +11,7 @@ use File::Find;
 use Debian::Debhelper::Dh_Lib;
 use File::StripNondeterminism;
 use Date::Parse;
+use POSIX qw(tzset);
 
 =head1 SYNOPSIS
 
@@ -61,6 +62,9 @@ sub testfile {
 	}
 }
 
+$ENV{'TZ'} = 'UTC';
+tzset();
+
 foreach my $package (@{$dh{DOPACKAGES}}) {
 	my $tmp=tmpdir($package);
 
diff --git a/bin/strip-nondeterminism b/bin/strip-nondeterminism
index 0beef90..a42f72d 100755
--- a/bin/strip-nondeterminism
+++ b/bin/strip-nondeterminism
@@ -23,6 +23,7 @@ use strict;
 use warnings;
 
 use File::StripNondeterminism;
+use POSIX qw(tzset);
 use Getopt::Long;
 Getopt::Long::Configure(qw(no_ignore_case permute bundling));
 
@@ -46,6 +47,9 @@ if ($glop->{version}) {
 	exit 0;
 }
 
+$ENV{'TZ'} = 'UTC';
+tzset();
+
 $File::StripNondeterminism::canonical_time = $glop->{timestamp};
 
 die $usage if @ARGV == 0;

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



More information about the Reproducible-commits mailing list