title: How to fix date methods from being off on heroku?
body: <p>My date methods aren't working correctly on Heroku. I created a user that goes by the <code>(GMT-05:00) Eastern Time (US &amp; Canada)</code> and is suppose to see products added based on the <code>date</code> attribute it has. So it suppose to say <code>Added 1 Product Today</code> but it's as if it's the methods themselves are recording by the day before. So <code>today</code> is actually yesterday and <code>yesterday</code> is actually the day after yesterday. </p>
  
  <p>Here are my methods:</p>
  
  <pre><code>  def self.today
      where(:date =&gt; Date.today)
    end
  
    def self.yesterday
      where(:date =&gt; Date.yesterday)
    end
  
    def self.this_week
      where(:date =&gt; Date.today.beginning_of_week..Date.today.end_of_week)
    end
  
    def self.last_week
      where(:date =&gt; 1.week.ago.beginning_of_week..1.week.ago.end_of_week)
    end
  
    def self.this_month
      where(:date =&gt; Date.today.beginning_of_month..Date.today.end_of_month)
    end
  
    def self.last_month
      where(:date =&gt; 1.month.ago.beginning_of_month..1.month.ago.end_of_month).order('date desc')
    end
  </code></pre>
  
  <p>So I guess it's always <code>-1 day</code> for every method on Heroku but not in development. Heroku's Time zone and Time are:</p>
  
  <pre><code>Loading production environment (Rails 3.2.8)
  irb(main):001:0&gt; Time.now
  Time.now
  =&gt; 2012-09-21 02:37:26 +0000
  irb(main):002:0&gt; Time.zone
  Time.zone
  =&gt; (GMT+00:00) UTC
  </code></pre>
  
  <p>This is wrong for me since it's <code>2012-09-20</code> in the US East.</p>
  
  <p>I want to have the methods work for every Timezone, not just <code>Eastern Timezone</code> so what should I do about this? How can I get a user to see the products they've added based on their Timezone?</p>
  
  <p>Thank you. </p>