Sha256: efa692ba3155f6cf3d96892be4aa1186ada8daebb90a7b09d7c887262188ff30

Contents?: true

Size: 250 Bytes

Versions: 5

Compression:

Stored size: 250 Bytes

Contents

# frozen_string_literal: true

DateTime.class_eval do
  # @return [DateTime]
  def in_utc
    utc? ? self : in_time_zone('UTC').to_datetime
  end
end

Time.class_eval do
  # @return [Time]
  def in_utc
    utc? ? self : in_time_zone('UTC')
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
in_utc_extension-1.0.0 lib/in_utc_extension.rb
in_utc_extension-1.0.0.pre.rc.1 lib/in_utc_extension.rb
in_utc_extension-0.0.5 lib/in_utc_extension.rb
in_utc_extension-0.0.4 lib/in_utc_extension.rb
in_utc_extension-0.0.3 lib/in_utc_extension.rb