Sha256: 3386632eee03fc9ace689edd412ea98853f179191929d4d788f0171d843bba3e

Contents?: true

Size: 369 Bytes

Versions: 1

Compression:

Stored size: 369 Bytes

Contents

# frozen_string_literal: true

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

class DateTime
  include DateAndTime::Compatibility

  silence_redefinition_of_method :to_time

  # Return an instance of +Time+ with the same UTC offset
  # as +self+.
  def to_time
    getlocal(utc_offset)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activesupport-7.2.0.beta1 lib/active_support/core_ext/date_time/compatibility.rb