Sha256: f8d51d5a355e1b2bfc5965c9268a25ec28a4f4d91876c2383b78418a35e01925
Contents?: true
Size: 585 Bytes
Versions: 10
Compression:
Stored size: 585 Bytes
Contents
class Time unless method_defined?(:dst_adjustment) # Adjust DST # # TODO: Can't seem to get this to pass ActiveSupport tests, # even though it is essentially identical to the ActiveSupport # code (see Time#since in time/calculations.rb). It handles # all but 4 tests. def dst_adjustment(time) self_dst = self.dst? ? 1 : 0 time_dst = time.dst? ? 1 : 0 seconds = (self - time).abs if (seconds >= 86400 && self_dst != time_dst) time + ((self_dst - time_dst) * 60 * 60) else time end end end end
Version data entries
10 entries across 9 versions & 2 rubygems