class RuboCop::Cop::Rails::TimeZone

def remove_redundant_in_time_zone(corrector, node)

remove redundant `.in_time_zone` from `Time.zone.now.in_time_zone`
def remove_redundant_in_time_zone(corrector, node)
  time_methods_called = extract_method_chain(node)
  return unless time_methods_called.include?(:in_time_zone) || time_methods_called.include?(:zone)
  while node&.send_type?
    if node.children.last == :in_time_zone
      in_time_zone_with_dot = node.loc.selector.adjust(begin_pos: -1)
      corrector.remove(in_time_zone_with_dot)
    end
    node = node.parent
  end
end