Project

General

Profile

Defect #23189 » 20180329_use_local_time_in_date_query.patch

Steve Karrmann, 2018-03-29 18:11

View differences:

app/models/query.rb
end
def date_for_user_time_zone(y, m, d)
if tz = User.current.time_zone
tz.local y, m, d
else
# Always use local time to avoid date query date offset issue (http://www.redmine.org/issues/23189)
Time.local y, m, d
end
end
# Returns a SQL clause for a date or datetime field.
(3-3/3)