From 21cd76e99ed7241464dfded13c8c96dc99cdcb08 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Wed, 27 May 2015 16:11:16 -0700 Subject: [PATCH] Ignore surrounding whitespace for integers in parsedate --- PBot/Utils/ParseDate.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PBot/Utils/ParseDate.pm b/PBot/Utils/ParseDate.pm index 414d9a8c..d58d49f0 100644 --- a/PBot/Utils/ParseDate.pm +++ b/PBot/Utils/ParseDate.pm @@ -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);