Fixed test failure with sqlite (#8842).
git-svn-id: http://svn.redmine.org/redmine/trunk@12478 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
a4d3da988a
commit
429b3a5dae
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue