Sha256: b20c5e3f15d08b96fef5a1e1753e648e06b3a60aa97fb38881b7907b89fb5d3d

Contents?: true

Size: 329 Bytes

Versions: 1

Compression:

Stored size: 329 Bytes

Contents

# frozen_string_literal: true

require 'active_support/core_ext/date_and_time/zones'
class DateTime
  # @return [DateTime]
  def in_utc
    utc? ? self : in_time_zone('UTC').to_datetime
  end
end


require 'active_support/time_with_zone'
class Time
  # @return [Time]
  def in_utc
    utc? ? self : in_time_zone('UTC')
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
in_utc_extension-0.0.1 lib/in_utc_extension.rb