This is the code:
require 'time'
t = Time.parse('2016-04-18') #data de ontém
t2 = Time.now #data atual
t3 = t2 - t # subtração das duas variáveis(datas) acima
puts Time.at(t3) #resultado da subtração
In this case the result should be a day and a few hours, but the program returns me that date: "1970-01-02 08:00:42 -0300". I do not know where I'm going wrong.