Sha256: a18ffe135dcad7ac9d1e45b635a94326090171778989fabf22a342db4ae1e419
Contents?: true
Size: 362 Bytes
Versions: 9
Compression:
Stored size: 362 Bytes
Contents
# frozen_string_literal: true require 'date' DateTime.class_eval do unless method_defined?(:in_utc) # @return [DateTime] def in_utc utc? ? self : in_time_zone('UTC').to_datetime end end end Time.class_eval do unless method_defined?(:in_utc) # @return [Time] def in_utc utc? ? self : in_time_zone('UTC') end end end
Version data entries
9 entries across 9 versions & 1 rubygems