summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-04-11 00:12:05 +0200
committerFlorian Pritz <bluewind@xinu.at>2017-04-11 00:12:05 +0200
commit293d6c0b8647d18d98030215b1bfa3b922f20a08 (patch)
treec2a3afe5f4386ec08a299df252035cc54a190b27
parent101c5c8057d9891f69d5c4660e883d2a4ac42dd5 (diff)
downloadApp-BorgRestore-293d6c0b8647d18d98030215b1bfa3b922f20a08.tar.gz
App-BorgRestore-293d6c0b8647d18d98030215b1bfa3b922f20a08.tar.xz
t2_parsing: Force UTC timezone
The test only worked in GMT+1 before this... Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--t/02_parsing.t16
1 files changed, 9 insertions, 7 deletions
diff --git a/t/02_parsing.t b/t/02_parsing.t
index bfa5e12..743ccd7 100644
--- a/t/02_parsing.t
+++ b/t/02_parsing.t
@@ -13,17 +13,19 @@ $db->set_true(qw(add_path -begin_work -commit -vacuum -add_archive_name));
$db->mock('-get_archive_id', sub {return 'prefix-archive-1' if $_[1] eq 'archive-1';});
$db->mock('-get_archive_names', sub {return []});
+$ENV{TZ} = 'UTC';
+
my $borg = Test::MockObject->new();
$borg->set_list('borg_list', ['archive-1']);
$borg->mock('list_archive', sub {
my ($self, $archive, $cb) = @_;
- $cb->("XXX, 1970-01-01 01:00:05 .");
- $cb->("XXX, 1970-01-01 01:00:10 boot");
- $cb->("XXX, 1970-01-01 01:00:20 boot/grub");
- $cb->("XXX, 1970-01-01 01:00:08 boot/grub/grub.cfg");
- $cb->("XXX, 1970-01-01 01:00:13 boot/foo");
- $cb->("XXX, 1970-01-01 01:00:13 boot/foo/blub");
- $cb->("XXX, 1970-01-01 01:00:19 boot/foo/bar");
+ $cb->("XXX, 1970-01-01 00:00:05 .");
+ $cb->("XXX, 1970-01-01 00:00:10 boot");
+ $cb->("XXX, 1970-01-01 00:00:20 boot/grub");
+ $cb->("XXX, 1970-01-01 00:00:08 boot/grub/grub.cfg");
+ $cb->("XXX, 1970-01-01 00:00:13 boot/foo");
+ $cb->("XXX, 1970-01-01 00:00:13 boot/foo/blub");
+ $cb->("XXX, 1970-01-01 00:00:19 boot/foo/bar");
} );
# Call the actual function we want to test