From 429b3a5daebe26bec8cac92540e002536384b135 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 3 Jan 2014 16:36:04 +0000 Subject: [PATCH] Fixed test failure with sqlite (#8842). git-svn-id: http://svn.redmine.org/redmine/trunk@12478 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/query.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/query.rb b/app/models/query.rb index 3c3bae76d..78c1f72a5 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -812,12 +812,13 @@ class Query < ActiveRecord::Base s = [] if from if from.is_a?(Date) - from = Time.local(from.year, from.month, from.day).beginning_of_day + from = Time.local(from.year, from.month, from.day).yesterday.end_of_day + else + from = from - 1 # second end if self.class.default_timezone == :utc from = from.utc end - from = from - 1 s << ("#{table}.#{field} > '%s'" % [connection.quoted_date(from)]) end if to