From 84d60f4f3ef9460e69fbee66f83d4e6485a0652d Mon Sep 17 00:00:00 2001 From: James Mason Date: Fri, 21 Sep 2018 17:37:29 -0700 Subject: [PATCH] Set application timezone in ENV --- config/application.rb | 2 +- dotenv.example | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index cfdf235c..e3483d4a 100644 --- a/config/application.rb +++ b/config/application.rb @@ -29,7 +29,7 @@ module Osem # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - # config.time_zone = 'Central Time (US & Canada)' + config.time_zone = (ENV['OSEM_TIME_ZONE'] || 'UTC') # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] diff --git a/dotenv.example b/dotenv.example index facf09c6..225116fa 100644 --- a/dotenv.example +++ b/dotenv.example @@ -30,6 +30,9 @@ # The ruby version to use # OSEM_RUBY_VERSION=2.5.0 +# What time is it? +# OSEM_TIME_ZONE="UTC" + # The name of your OSEM installation # OSEM_NAME=OSEM