Re: Time issues

pb pb
Sun, 17 May 2009 16:21:42 -0000

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
:))
--
Posted via http://www.ruby-forum.com/.