title: PostgreSQL date() with timezone
body: <p>I'm having an issue selecting dates properly from Postgres - they are being stored in UTC, but 
  not converting with the Date() function properly.</p>
  
  <p>Converting the timestamp to a date gives me the wrong date if it's past 4pm PST.</p>
  
  <p><code>2012-06-21</code> should be <code>2012-06-20</code> in this case.</p>
  
  <p>The <code>starts_at</code> column datatype is <code>timestamp without time zone</code>. Here are my queries: </p>
  
  <p>Without converting to PST timezone: </p>
  
  <pre><code>Select starts_at from schedules where id = 40;
  
        starts_at      
  ---------------------
   2012-06-21 01:00:00
  </code></pre>
  
  <p>Converting gives this:</p>
  
  <pre><code>Select (starts_at at time zone 'pst') from schedules where id = 40;
          timezone        
  ------------------------
   2012-06-21 02:00:00-07
  </code></pre>
  
  <p>But neither convert to the correct date in the timezone.</p>