Commit 771b8d9a authored by Chris Lamb's avatar Chris Lamb 💬

Merge tag '0.027' into debian

Release 0.027

* tag '0.027':
  Release 0.027
  Also set timezone in tests. (Closes: #837382)
  Add a File::StripNondeterminism::init method to avoid tzset DRY violation.
parents 2553172e 7a1e8230
......@@ -11,7 +11,6 @@ use File::Find;
use Debian::Debhelper::Dh_Lib;
use File::StripNondeterminism;
use Date::Parse;
use POSIX qw(tzset);
=head1 SYNOPSIS
......@@ -62,8 +61,7 @@ sub testfile {
}
}
$ENV{'TZ'} = 'UTC';
tzset();
File::StripNondeterminism::init();
foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp=tmpdir($package);
......
......@@ -23,7 +23,6 @@ use strict;
use warnings;
use File::StripNondeterminism;
use POSIX qw(tzset);
use Getopt::Long;
Getopt::Long::Configure(qw(no_ignore_case permute bundling));
......@@ -50,8 +49,7 @@ if ($want_version) {
exit 0;
}
$ENV{'TZ'} = 'UTC';
tzset();
File::StripNondeterminism::init()
$File::StripNondeterminism::canonical_time = $timestamp;
$File::StripNondeterminism::clamp_time = $clamp_timestamp;
......
......@@ -21,6 +21,7 @@ package File::StripNondeterminism;
use strict;
use warnings;
use POSIX qw(tzset);
use File::StripNondeterminism::handlers::ar;
use File::StripNondeterminism::handlers::gettext;
use File::StripNondeterminism::handlers::gzip;
......@@ -33,7 +34,12 @@ use File::StripNondeterminism::handlers::zip;
our($VERSION, $canonical_time, $clamp_time);
$VERSION = '0.026'; # 0.026
$VERSION = '0.027'; # 0.027
sub init {
$ENV{'TZ'} = 'UTC';
tzset();
}
sub _get_file_type {
my $file=shift;
......
......@@ -46,6 +46,8 @@ my %STAT = (
12 => "blocks (actual number of system-specific blocks allocated on disk)",
);
File::StripNondeterminism::init();
$File::StripNondeterminism::canonical_time = 1423159771;
my @fixtures = glob('t/fixtures/*/*.in');
......
......@@ -27,6 +27,8 @@ use File::StripNondeterminism;
use strict;
use warnings;
File::StripNondeterminism::init();
my $dir = tempdir( CLEANUP => 1 );
my $path;
my $fh;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment