Sha256: e06949cab8b3b2b99855b30abf221700faccedc86ecc0a5a830eb1c26d967fd4

Contents?: true

Size: 415 Bytes

Versions: 1

Compression:

Stored size: 415 Bytes

Contents

# frozen_string_literal: true

require_relative "../date_and_time/compatibility"
require_relative "../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

1 entries across 1 versions & 1 rubygems

Version Path
ruby-on-quails-0.1.0 activesupport/lib/active_support/core_ext/time/compatibility.rb