Project

General

Profile

Feature #13803 » 0001-Implemented-for-MySQL-as-well.patch

Marius BĂLTEANU, 2018-12-14 22:39

View differences:

lib/redmine/database.rb
74 74
          else
75 75
            "#{column}::date"
76 76
          end
77
        elsif mysql?
78
          if time_zone
79
            identifier = ActiveSupport::TimeZone.find_tzinfo(time_zone.name).identifier
80
            "CONVERT_TZ(DATE(#{column}),'#{Time.zone.name}', '#{identifier}')"
81
          else
82
            "DATE(#{column})"
83
          end
77 84
        end
78 85
      end
79 86

  
(2-2/3)