Sha256: 6f5dc1579c6da41d9ab17ffbc4c3c7d1fa7f3ff706d7452f1c7b0358d944695d

Contents?: true

Size: 449 Bytes

Versions: 206

Compression:

Stored size: 449 Bytes

Contents

# frozen_string_literal: true

require "active_support/core_ext/date_and_time/compatibility"
require "active_support/core_ext/module/redefine_method"

class Time
  include DateAndTime::Compatibility

  silence_redefinition_of_method :to_time

  # Either return +self+ or the time in the local system timezone depending
  # on the setting of +ActiveSupport.to_time_preserves_timezone+.
  def to_time
    preserve_timezone ? self : getlocal
  end
end

Version data entries

206 entries across 191 versions & 24 rubygems

Version Path
activesupport-7.1.5 lib/active_support/core_ext/time/compatibility.rb
activesupport-7.1.4.2 lib/active_support/core_ext/time/compatibility.rb
activesupport-7.0.8.6 lib/active_support/core_ext/time/compatibility.rb
activesupport-6.1.7.10 lib/active_support/core_ext/time/compatibility.rb
activesupport-6.1.7.9 lib/active_support/core_ext/time/compatibility.rb
activesupport-7.1.4.1 lib/active_support/core_ext/time/compatibility.rb
activesupport-7.0.8.5 lib/active_support/core_ext/time/compatibility.rb
activesupport-7.1.4 lib/active_support/core_ext/time/compatibility.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.8.4/lib/active_support/core_ext/time/compatibility.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.4/lib/active_support/core_ext/time/compatibility.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.5.1/lib/active_support/core_ext/time/compatibility.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.5.1/lib/active_support/core_ext/time/compatibility.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.5.1/lib/active_support/core_ext/time/compatibility.rb
katalyst-govuk-formbuilder-1.9.2 vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/core_ext/time/compatibility.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/core_ext/time/compatibility.rb
activesupport-7.2.0.beta2 lib/active_support/core_ext/time/compatibility.rb
activesupport-7.1.3.4 lib/active_support/core_ext/time/compatibility.rb
activesupport-7.0.8.4 lib/active_support/core_ext/time/compatibility.rb
activesupport-6.1.7.8 lib/active_support/core_ext/time/compatibility.rb
activesupport-7.1.3.2 lib/active_support/core_ext/time/compatibility.rb