Skip to content

Commit af2e4d6

Browse files
committed
Keep compatibility with Redmine 5
1 parent e0d29ba commit af2e4d6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

init.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,14 @@
1919
class ApplicationRecord < ActiveRecord::Base
2020
self.abstract_class = true
2121
end
22+
23+
module ActiveRecordDefaultTimezonePatch
24+
def default_timezone
25+
ActiveRecord::Base.default_timezone
26+
end
27+
def default_timezone=(value)
28+
ActiveRecord::Base.default_timezone = value
29+
end
30+
end
31+
ActiveRecord.extend(ActiveRecordDefaultTimezonePatch)
2232
end

0 commit comments

Comments
 (0)