diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-10-24 16:36:28 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-10-24 16:36:28 +0100 |
commit | 7cb0812d212475c53b0175f832bb7ffe33de1749 (patch) | |
tree | 1a5142c1c614d6d75701be0dfe218995d1a6b30c | |
parent | 4c06098a7ba84dea6036784ce2279c9903af0f0e (diff) | |
parent | b4ed63758425224440ed3b7782b1f5010995aaa8 (diff) |
Merge remote-tracking branch 'openaustralia_github/add_timezone_support' into develop
-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 1b30ffce6..0d6ecfc11 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 => '', |