]> source.dussan.org Git - redmine.git/commitdiff
Fix that date grouping for MySQL is not working (#32046, #13803).
authorGo MAEDA <maeda@farend.jp>
Thu, 12 Sep 2019 22:55:44 +0000 (22:55 +0000)
committerGo MAEDA <maeda@farend.jp>
Thu, 12 Sep 2019 22:55:44 +0000 (22:55 +0000)
Patch by Mizuki ISHIKAWA.

git-svn-id: http://svn.redmine.org/redmine/trunk@18460 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/database.rb

index 979363329893f3d489c95c96fd4da9e8c60cf580..0f0876157d732255d37543b7b32ccf03de4b05cc 100644 (file)
@@ -80,7 +80,7 @@ module Redmine
           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}')"
+            "DATE(CONVERT_TZ(#{column},'#{local_identifier}', '#{user_identifier}'))"
           else
             "DATE(#{column})"
           end