Commit a9440d74 authored by Leigh B Stoller's avatar Leigh B Stoller

Oops, forgot to load Time::Local.

parent 82d24c28
...@@ -40,6 +40,7 @@ use emdb; ...@@ -40,6 +40,7 @@ use emdb;
use English; use English;
use Carp; use Carp;
use Date::Parse; use Date::Parse;
use Time::Local;
# Configure variables. # Configure variables.
my $TB = "@prefix@"; my $TB = "@prefix@";
...@@ -750,7 +751,7 @@ sub TBDateStringGMT($) ...@@ -750,7 +751,7 @@ sub TBDateStringGMT($)
return "" return ""
if (!defined($date) || "$date" eq ""); if (!defined($date) || "$date" eq "");
if ($date !~ /^\d$/) { if ($date !~ /^\d+$/) {
$date = str2time($date); $date = str2time($date);
} }
return POSIX::strftime("20%y-%m-%dT%H:%M:%SZ", gmtime($date)); return POSIX::strftime("20%y-%m-%dT%H:%M:%SZ", gmtime($date));
...@@ -763,7 +764,7 @@ sub TBDateStringLocal($) ...@@ -763,7 +764,7 @@ sub TBDateStringLocal($)
return "" return ""
if (!defined($date) || "$date" eq ""); if (!defined($date) || "$date" eq "");
if ($date !~ /^\d*$/) { if ($date !~ /^\d+$/) {
$date = timelocal(strptime($date)); $date = timelocal(strptime($date));
} }
return POSIX::strftime("20%y-%m-%d %H:%M:%S", localtime($date)); return POSIX::strftime("20%y-%m-%d %H:%M:%S", localtime($date));
......
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