From: Robert Klemme Date: 2010-09-16T21:33:38+09:00 Subject: Re: Get the beginning of the hour and the end of the hour On Thu, Sep 16, 2010 at 2:03 AM, Chris Gunnels wrote: > Xeno Campanoli / Eskimo North and Gmail wrote: >> On 10-09-15 02:47 PM, Chris Gunnels wrote: >>> >>> Thanks >> >> Time.local instantiation method? >> >> t = Time.now >> bt = Time.local(t.year,t.mon,t.day,t.hour,0,0) >> et = Time.local(t.year,t.mon,t.day.d.hour,59,0) >> >> xc > > awesome...thats what I wanted Not so fast! Is this really the end? Which hour does Time.local(t.year,t.mon,t.day.d.hour,59,17) belong to? I would probably rather do et = Time.local(t.year,t.mon,t.day.d.hour + 1,0,0) and treat the hour as half open interval (i.e. beginning is included, end is excluded). Note that Time also has #usec! Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/