module DateAndTime::Compatibility
def self.preserve_timezone # :nodoc:
Rails 8.0 anyway.
is in turn included in several places. This will all go away in
of prepending on to it, to avoid overcomplicating a module that
This re-implements the behaviour of the mattr_reader, instead
--
def self.preserve_timezone # :nodoc: if @@preserve_timezone.nil? # Only warn once, the first time the value is used (which should # be the first time #to_time is called). ActiveSupport.deprecator.warn( "`to_time` will always preserve the receiver timezone rather than system local time in Rails 8.1." \ "To opt in to the new behavior, set `config.active_support.to_time_preserves_timezone = :zone`." ) @@preserve_timezone = false end @@preserve_timezone end