1
2
3
4
5
def add_days(time, days)
  time + days * 86400
end

add_days(Time.new(2013, 3, 10, 0), 1) == Time.new(2013, 3, 11, 0) # => true