Defect #23189 » 20180329_use_local_time_in_date_query.patch
app/models/query.rb | ||
---|---|---|
1304 | 1304 |
end |
1305 | 1305 | |
1306 | 1306 |
def date_for_user_time_zone(y, m, d) |
1307 |
if tz = User.current.time_zone |
|
1308 |
tz.local y, m, d |
|
1309 |
else |
|
1307 |
# Always use local time to avoid date query date offset issue (http://www.redmine.org/issues/23189) |
|
1310 | 1308 |
Time.local y, m, d |
1311 |
end |
|
1312 | 1309 |
end |
1313 | 1310 | |
1314 | 1311 |
# Returns a SQL clause for a date or datetime field. |
- « Previous
- 1
- 2
- 3
- Next »