summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Search.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index eed5013f5..75cf8bb27 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -974,6 +974,10 @@ sub init {
sub SqlifyDate {
my ($str) = @_;
$str = "" if !defined $str;
+ if ($str eq "") {
+ my ($sec, $min, $hour, $mday, $month, $year, $wday) = localtime(time());
+ return sprintf("%4d-%02d-%02d 00:00:00", $year+1900, $month+1, $mday);
+ }
if ($str =~ /^-?(\d+)([dDwWmMyY])$/) { # relative date
my ($amount, $unit, $date) = ($1, lc $2, time);
my ($sec, $min, $hour, $mday, $month, $year, $wday) = localtime($date);