mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
Implement date grouping for MySQL (#13803).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17745 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
fee009f04f
commit
7386ec037e
@ -74,6 +74,14 @@ module Redmine
|
|||||||
else
|
else
|
||||||
"#{column}::date"
|
"#{column}::date"
|
||||||
end
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user