title: Ignoring time zones altogether in Rails and PostgreSQL
body: <p>I'm dealing with dates and times in Rails and Postgres and running into this issue:</p>
  
  <p>The database is in UTC.</p>
  
  <p>The user sets a time-zone of choice in the Rails app, but it's only to be used when getting the users local time for comparing times.</p>
  
  <p>User stores a time, say March 17, 2012, 7pm. I don't want timezone conversions or the timezone to be stored. I just want that date and time saved. That way if the user changed their time zone, It would still show March 17, 2012, 7pm.</p>
  
  <p>I only use the users specified time zone to get records 'before' or 'after' the current time in the users local time zone. </p>
  
  <p>I'm currently using 'timestamp without time zone' but when I retrieve the records, rails (?) converts them to the time zone in the app, which I don't want. </p>
  
  <pre><code>Appointment.first.time
   =&gt; Fri, 02 Mar 2012 19:00:00 UTC +00:00 
  </code></pre>
  
  <p>Because the records in the database seem to come out as UTC, my hack is to take the current time, remove the time zone with 'Date.strptime(str, "%m/%d/%Y")' and then do my query with that:</p>
  
  <pre><code>.where("time &gt;= ?", date_start)
  </code></pre>
  
  <p>It seems like there must be an easier way to just ignore time zones all around. Any ideas?</p>