Ignore surrounding whitespace for integers in parsedate

This commit is contained in:
Pragmatic Software 2015-05-27 16:11:16 -07:00
parent 277b363310
commit 21cd76e99e
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ sub parsedate {
my $seconds = 0;
foreach my $input (@inputs) {
return -1 if $input =~ m/forever/i;
$input .= ' seconds' if $input =~ m/^\d+$/;
$input .= ' seconds' if $input =~ m/^\s*\d+\s*$/;
my $parse = Time::ParseDate::parsedate($input, NOW => $now);