lib/active_support.rb in activesupport-7.2.0.beta1 vs lib/active_support.rb in activesupport-7.2.0.beta2
- old
+ new
@@ -109,18 +109,20 @@
def self.cache_format_version=(value)
Cache.format_version = value
end
def self.to_time_preserves_timezone
- ActiveSupport.deprecator.warn(
- "`config.active_support.to_time_preserves_timezone` has been deprecated and will be removed in Rails 7.3."
- )
+ DateAndTime::Compatibility.preserve_timezone
end
def self.to_time_preserves_timezone=(value)
- ActiveSupport.deprecator.warn(
- "`config.active_support.to_time_preserves_timezone` has been deprecated and will be removed in Rails 7.3."
- )
+ unless value
+ ActiveSupport.deprecator.warn(
+ "Support for the pre-Ruby 2.4 behavior of to_time has been deprecated and will be removed in Rails 8.0."
+ )
+ end
+
+ DateAndTime::Compatibility.preserve_timezone = value
end
def self.utc_to_local_returns_utc_offset_times
DateAndTime::Compatibility.utc_to_local_returns_utc_offset_times
end