Commit 9aa4256b authored by jplang's avatar jplang
Browse files

Implement date grouping for MySQL (#13803).

Patch by Marius BALTEANU.

git-svn-id: https://svn.redmine.org/redmine/trunk@17745 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 6940d5fa
......@@ -74,6 +74,14 @@ module Redmine
else
"#{column}::date"
end
elsif mysql?
if time_zone
user_identifier = ActiveSupport::TimeZone.find_tzinfo(time_zone.name).identifier
local_identifier = ActiveSupport::TimeZone.find_tzinfo(Time.zone.name).identifier
"CONVERT_TZ(DATE(#{column}),'#{local_identifier}', '#{user_identifier}')"
else
"DATE(#{column})"
end
end
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment