diff options
-rw-r--r-- | config/environment.rb | 3 | ||||
-rw-r--r-- | config/general.yml-example | 4 | ||||
-rw-r--r-- | lib/configuration.rb | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/config/environment.rb b/config/environment.rb index 3ce887c03..8611dd1b6 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -77,6 +77,9 @@ Rails::Initializer.run do |config| # Make Active Record use UTC-base instead of local time config.active_record.default_timezone = :utc + # This is the timezone that times and dates are displayed in + config.time_zone = Configuration::time_zone + config.after_initialize do require 'routing_filters.rb' end diff --git a/config/general.yml-example b/config/general.yml-example index 9646e45c8..5be01b611 100644 --- a/config/general.yml-example +++ b/config/general.yml-example @@ -16,6 +16,10 @@ DOMAIN: '127.0.0.1:3000' # (http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) ISO_COUNTRY_CODE: GB +# This is the timezone that times and dates are displayed in +# If not set defaults to UTC. +#TIME_ZONE: Australia/Sydney + # These feeds are displayed accordingly on the Alaveteli "blog" page: BLOG_FEED: 'http://www.mysociety.org/category/projects/whatdotheyknow/feed/' TWITTER_USERNAME: 'whatdotheyknow' diff --git a/lib/configuration.rb b/lib/configuration.rb index ee2ce40c5..baec8b67a 100644 --- a/lib/configuration.rb +++ b/lib/configuration.rb @@ -44,6 +44,7 @@ module Configuration :SPECIAL_REPLY_VERY_LATE_AFTER_DAYS => 60, :THEME_URL => "", :THEME_URLS => [], + :TIME_ZONE => "UTC", :TRACK_SENDER_EMAIL => 'contact@localhost', :TRACK_SENDER_NAME => 'Alaveteli', :TWITTER_USERNAME => '', |