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
You could do this.
adjusted_datetime = (datetime_from_form.to_time - n.hours).to_datetime