diff options
author | myk%mozilla.org <> | 2003-08-27 08:56:45 +0200 |
---|---|---|
committer | myk%mozilla.org <> | 2003-08-27 08:56:45 +0200 |
commit | 9ba963d10b32db31a0ca159c729d4ebe99746950 (patch) | |
tree | 65c2ffe0131ca6c7866ab9a50181fbaeb5a42593 | |
parent | 36b4d0d3fb9d34dac8c604eea202590000298195 (diff) | |
download | bugzilla-9ba963d10b32db31a0ca159c729d4ebe99746950.tar.gz bugzilla-9ba963d10b32db31a0ca159c729d4ebe99746950.tar.xz |
Fix for bug 217029: creates appropriate date string if string is empty now that Date::Parse 2.27 doesn't do it for us auto-magically.
r=justdave
a=justdave
-rw-r--r-- | Bugzilla/Search.pm | 4 |
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); |