I have a Ruby DateTime which gets filled from a form. Additionally I have n hours from the form as well. I\'d like to subtract those n hours from the previous DateTime. (To
If I'm allowed to use Time instead of DateTime (There are several ways to translate one to another):
Time
DateTime
# Just remove the number of seconds from the Time object Time.now - (6 * 60 * 60) # 6 hours ago