summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB/Pg.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/DB/Pg.pm')
-rw-r--r--Bugzilla/DB/Pg.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm
index f4569b9fd..4424e65fd 100644
--- a/Bugzilla/DB/Pg.pm
+++ b/Bugzilla/DB/Pg.pm
@@ -114,7 +114,7 @@ sub sql_limit {
sub sql_to_days {
my ($self, $date) = @_;
- return "TO_CHAR($date, 'J')::int";
+ return "TO_CHAR(${date}::date, 'J')::int";
}
sub sql_date_format {