require "active_support/time" t = gets.chomp t2 = Time.strptime(t, "%H:%M") puts "#{t2.hour}:#{t2.min + 5.min}"