Hello all-I’m a new Ruby developer(but longtime java developer), and
I’m having trouble getting Time to work for me.
With a ‘base’ date as Monday of this week:
Time.now.beginning_of_week.asctime
=> “Mon Dec 10 00:00:00 2007”
I can advance days without problems
Time.now.beginning_of_week.advance({ :days=> 15 } )
=> Tue Dec 25 00:00:00 -0600 2007
but if I try to advance minutes, my code fails silently:
Time.now.beginning_of_week.advance({ :minutes=> 15 } ).asctime
Time.now.beginning_of_week.advance({ :minutes=> 15 } ).asctime
=> “Mon Dec 10 00:00:00 2007”
Any ideas on what I’m doing wrong? I’m on Rails 1.2.6