diff options
Diffstat (limited to 'config/initializers/time_zone.rb')
-rw-r--r-- | config/initializers/time_zone.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/config/initializers/time_zone.rb b/config/initializers/time_zone.rb index ee246e67d66..bca7411ad63 100644 --- a/config/initializers/time_zone.rb +++ b/config/initializers/time_zone.rb @@ -1 +1,8 @@ Time.zone = Gitlab.config.gitlab.time_zone || Time.zone +# The default is normally set by Rails in the +# active_support.initialize_time_zone Railtie, but we need to set it +# here because the config settings aren't available until after that +# runs. We set the default to ensure multi-threaded servers have the +# right value. +Time.zone_default = Time.zone +Rails.application.config.time_zone = Time.zone |