lib/active_support/railtie.rb in activesupport-7.2.2 vs lib/active_support/railtie.rb in activesupport-8.0.0.beta1
- old
+ new
@@ -94,9 +94,13 @@
require "active_support/core_ext/time/zones"
Time.zone_default = Time.find_zone!(app.config.time_zone)
config.eager_load_namespaces << TZInfo
end
+ initializer "active_support.to_time_preserves_timezone" do |app|
+ ActiveSupport.to_time_preserves_timezone = app.config.active_support.to_time_preserves_timezone
+ end
+
# Sets the default week start
# If assigned value is not a valid day symbol (e.g. :sunday, :monday, ...), an exception will be raised.
initializer "active_support.initialize_beginning_of_week" do |app|
require "active_support/core_ext/date/calculations"
beginning_of_week_default = Date.find_beginning_of_week!(app.config.beginning_of_week)