#!perl -w
-# Copyright (C) 2019 all contributors <meta@public-inbox.org>
+# Copyright (C) 2019-2020 all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
use strict;
use Test::More;
use PublicInbox::Git;
use PublicInbox::MsgTime qw(msg_timestamp msg_datestamp);
use POSIX qw(strftime);
-eval { require Date::Parse } or plan skip_all => "Date::Parse missing for $0";
+require_mods('Date::Parse');
my $git;
my ($inboxdir, $git_dir) = @ENV{qw(GIANT_INBOX_DIR GIANT_GIT_DIR)};
if (defined $inboxdir) {
# off is the time zone offset in seconds from GMT
my ($ss,$mm,$hh,$day,$month,$year,$off) = Date::Parse::strptime($date);
+
+ # new behavior which wasn't in the original old version:
+ if ('commit d857e7dc0d816b635a7ead09c3273f8c2d2434be') {
+ # "msgtime: assume +0000 if TZ missing when using Date::Parse"
+ $off //= '+0000';
+ }
+
return undef unless(defined $off);
# Compute the time zone from offset