X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Flei_store.t;h=5a5e5de03e16452467c07d44528dca1dacc516b3;hb=563206c94db52f7e0e6d899fef2681c9e63f8fee;hp=73b5c74db0e3468cffe29dadd0054136a950c641;hpb=4d594e98063aaad1ce9a90709af7edc5c44a0163;p=public-inbox.git
diff --git a/t/lei_store.t b/t/lei_store.t
index 73b5c74d..5a5e5de0 100644
--- a/t/lei_store.t
+++ b/t/lei_store.t
@@ -1,5 +1,5 @@
#!perl -w
-# Copyright (C) 2020-2021 all contributors
+# Copyright (C) all contributors
# License: AGPL-3.0+
use strict;
use v5.10.1;
@@ -124,4 +124,32 @@ SKIP: {
'kw_changed undef on unknown message');
}
+SKIP: {
+ require_mods(qw(HTTP::Date), 1);
+ my $now = HTTP::Date::time2str(time);
+ $now =~ s/GMT/+0000/ or xbail "no GMT in $now";
+ my $eml = PublicInbox::Eml->new(<<"EOM");
+Received: (listserv\@example.com) by example.com via listexpand
+ id abcde (ORCPT );
+ $now;
+Date: $now
+Subject: timezone-dependent test
+
+WHAT IS TIME ANYMORE?
+EOM
+
+ my $smsg = $sto->add_eml($eml);
+ ok($smsg && $smsg->{blob}, 'recently received message');
+ $sto->done;
+ local $ENV{TZ} = 'GMT+5';
+ my $lse = $sto->search;
+ my $qstr = 'rt:1.hour.ago.. s:timezone';
+ $lse->query_approxidate($lse->git, $qstr);
+ my $mset = $lse->mset($qstr);
+ is($mset->size, 1, 'rt:1.hour.ago.. works w/ local time');
+}
+
+is_deeply([glob("$store_dir/local/*.git/info/refs")], [],
+ 'no info/refs in private lei/store');
+
done_testing;