# Time issues

**URL:** <https://www.ruby-forum.com/t/time-issues/168177>\
**Category:** Rails\
**Created:** [May 17, 2009, 6:20pm UTC](https://www.ruby-forum.com/t/time-issues/168177 "2009-05-17T18:20:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![p-b](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a3d4f5/32.png) [@p-b](https://www.ruby-forum.com/u/p-b)\
**Post date:** [May 17, 2009, 6:20pm UTC](https://www.ruby-forum.com/t/time-issues/168177/1 "2009-05-17T18:20:38Z")

</div>

OK,

so I have a model that contains 2 records, among others  
startdate :time  
enddate :time

I have one set of values in the database  
20:00:00 for startdate and the same for enddate

However, I have no clue how to add 90 minutes to enddate, relative to  
startdate.

Event though the datase has 20:00:00 only, I get inside my view  
something like Sun May 17 18:00:00 +0300 2009 and I cannot get it to add  
90 minutes to display Sun May 17 19:30:00 +0300 2009

I tried with advance method, but only :days, :years etc works… :hours,  
:minutes don’t change anything…

---

<div class="post-metadata">

**Author:** ![p-b](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a3d4f5/32.png) [@p-b](https://www.ruby-forum.com/u/p-b)\
**Post date:** [May 17, 2009, 6:21pm UTC](https://www.ruby-forum.com/t/time-issues/168177/2 "2009-05-17T18:21:42Z")

</div>

pb pb wrote:

> OK,
> 
> so I have a model that contains 2 records, among others  
> startdate :time  
> enddate :time
> 
> I have one set of values in the database  
> 20:00:00 for startdate and the same for enddate
> 
> However, I have no clue how to add 90 minutes to enddate, relative to  
> startdate.
> 
> Event though the datase has 20:00:00 only, I get inside my view  
> something like Sun May 17 18:00:00 +0300 2009 and I cannot get it to add  
> 90 minutes to display Sun May 17 19:30:00 +0300 2009
> 
> I tried with advance method, but only :days, :years etc works… :hours,  
> :minutes don’t change anything…

never mind, it seems that @myobject.starttime + 90.minutes did the trick  
:))
