Commit 36442057d5bc168a5fbc841d62391b0836ca5682
Committed by
Braulio Bhavamitra
1 parent
99fa04df
Exists in
master
and in
27 other branches
Set default timezone as needed by rails 3.2
Without this, rails won't convert back to system timezone when reading timestamṕ/datatime fields from database. https://github.com/rails/rails/issues/6816
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
config/application.rb
| ... | ... | @@ -115,6 +115,9 @@ module Noosfero |
| 115 | 115 | :key => '_noosfero_session', |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | + config.time_zone = File.read('/etc/timezone').split("\n").first | |
| 119 | + config.active_record.default_timezone = :local | |
| 120 | + | |
| 118 | 121 | config.i18n.load_path += Dir.glob "#{Rails.root}/{baseplugins,config/plugins/*}/locales/*.{rb,yml}" |
| 119 | 122 | |
| 120 | 123 | Noosfero::Plugin.setup(config) | ... | ... |