On 9/15/2010 4:47 PM, Chris Gunnels wrote:
> I would like to Get the beginning of the current hour and the end of the
> current hour in the regular time format Wed Sep 15 15:45:47 -0600 2010
> 
> I would like to get Wed Sep 15 15:00:00 -0600 2010 and Wed Sep 15
> 15:59:59 -0600 2010
> 
> I have tried a few things and have search google for
> Time.now.beginning_of_hour and Time.now.end_of_hour, but no luck

Here's a quickie for the beginning of the current hour:

Time.at(Time.now.to_i / 3600 * 3600)

and for the end of the current hour:

Time.at(Time.now.to_i / 3600 * 3600 + 59 * 60 + 59)

You can simplify that last one a bit, but it's a little more obvious
what's going on this way.

-Jeremy