mirror of
https://github.com/redmine/redmine.git
synced 2025-11-04 20:35:57 +01:00
Replace Date.today with User.current.today (#22320).
Depending on the offset between a user's configured timezone and the server timezone, Date.today may be more or less often wrong from the user's perspective, leading to things like issues marked as overdue too early or too late, or yesterday / tomorrow being displayed / selected where 'today' is intended. A test case illustrating the problem with Issue#overdue? is included Patch by Jens Kraemer. git-svn-id: http://svn.redmine.org/redmine/trunk@15379 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -441,7 +441,7 @@ class IssuesController < ApplicationController
|
||||
@issue.project ||= @issue.allowed_target_projects.first
|
||||
end
|
||||
@issue.author ||= User.current
|
||||
@issue.start_date ||= Date.today if Setting.default_issue_start_date_to_creation_date?
|
||||
@issue.start_date ||= User.current.today if Setting.default_issue_start_date_to_creation_date?
|
||||
|
||||
attrs = (params[:issue] || {}).deep_dup
|
||||
if action_name == 'new' && params[:was_default_status] == attrs[:status_id]
|
||||
|
||||
Reference in New Issue
Block a user