Sha256: 2cbf323db30e4d662aa8f126593365d23f6a3d5e92ab1ba4c19a9abdc3925537

Contents?: true

Size: 408 Bytes

Versions: 45

Compression:

Stored size: 408 Bytes

Contents

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

class Time
  include DateAndTime::Compatibility

  remove_possible_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

45 entries across 45 versions & 5 rubygems

Version Path
activesupport-5.1.1 lib/active_support/core_ext/time/compatibility.rb
activesupport-5.0.3 lib/active_support/core_ext/time/compatibility.rb
activesupport-5.1.0 lib/active_support/core_ext/time/compatibility.rb
activesupport-5.1.0.rc2 lib/active_support/core_ext/time/compatibility.rb
activesupport-5.1.0.rc1 lib/active_support/core_ext/time/compatibility.rb