This method is deprecated or moved on the latest stable version.
The last existing version (v2.3.8) is shown here.
initialize_time_zone()
public
Sets the default value for Time.zone, and turns on
ActiveRecord::Base#time_zone_aware_attributes. If assigned value cannot be
matched to a TimeZone, an exception will be
raised.
# File railties/lib/initializer.rb, line 557
def initialize_time_zone
if configuration.time_zone
zone_default = Time.__send__(:get_zone, configuration.time_zone)
unless zone_default
raise \
'Value assigned to config.time_zone not recognized.' +
'Run "rake -D time" for a list of tasks for finding appropriate time zone names.'
end
Time.zone_default = zone_default
if configuration.frameworks.include?(:active_record)
ActiveRecord::Base.time_zone_aware_attributes = true
ActiveRecord::Base.default_timezone = :utc
end
end
end