projects
/
public-inbox.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
55b5349
)
t/nntp.t: fix parse_time test for non-GMT local time
author
Eric Wong <e@yhbt.net>
Mon, 6 Jan 2020 04:47:52 +0000 (22:47 -0600)
committer
Eric Wong <e@yhbt.net>
Mon, 6 Jan 2020 06:14:02 +0000 (06:14 +0000)
Yes, there's actually other timezones!
t/nntp.t
patch
|
blob
|
history
diff --git
a/t/nntp.t
b/t/nntp.t
index 938eef385bb5f2b12e3abccd5954d9db183c2f0c..24fe487c3fbec040e0978322194031b1483683dc 100644
(file)
--- a/
t/nntp.t
+++ b/
t/nntp.t
@@
-68,7
+68,7
@@
use_ok 'PublicInbox::Inbox';
my ($date, $time, $gmt) = @_;
my $m = join(' ', @_);
my $ts = PublicInbox::NNTP::parse_time(@_);
- my @t =
gm
time($ts);
+ my @t =
$gmt ? gmtime($ts) : local
time($ts);
my ($d, $t) = split(' ', strftime('%Y%m%d %H%M%S', @t));
if (length($date) != 8) { # Net::NNTP uses YYMMDD :<
$d =~ s/^[0-9]{2}//;