class Time

def ===(other)

Overriding case equality method so that it returns true for ActiveSupport::TimeWithZone instances
def ===(other)
  super || (self == Time && other.is_a?(ActiveSupport::TimeWithZone))
end