title: Ruby on Rails query by datetime range ( last 24, 48, etc... hours )
body: <p>I'm trying to build a query that will search for recent entries based on column 'last_login_at'. This is a datetime field with time zone (i.e. <code>Time.zone.now</code>)
  When I execute </p>
  
  <pre><code>User.find(:all, :conditions =&gt; ["last_login_at &lt; ?", 24.hours.ago])
  </code></pre>
  
  <p>I get nothing.</p>
  
  <p>Alternatively I can define today as <code>Time.zone.today</code> and yesterday as <code>Time.zone.today - 1.day</code>
  and run</p>
  
  <pre><code>User.find(:all, :conditions =&gt; ["last_login_at between ? and ?", today, yesterday])
  </code></pre>
  
  <p>and it still returns 0 results. I know there are some entries that fall into this category.</p>