I am having a trouble setting the default ActiveSupport::TimeZone in my padrino project.
In my boot.rb I have
Padrino.after_load do
Time.zone = 'UTC'
ActiveRecord::Base.default_timezone = :utc
end
My controller file has:
MyApp::App.controllers :post do
get :index do
puts Time.zone # this returns nil
render 'index'
end
end
When I hit the index action I get nil for Time.zone. It seems as though something might be overwriting Time.zone or it isn't loaded properly.
- I am able to print out the Timezone after setting it in boot.rb. So I know it was set.