title: Rails: Set config.time_zone to the server's time zone?
body: <p>For compatibility reasons I need to store and display all dates in the server's local time zone. To do this I configured the rails application like this in <code>application.rb</code>:</p>
  
  <pre><code># Do not convert database DATETIME / DATE columns to UTC:
  config.active_record.default_timezone = :local
  </code></pre>
  
  <p>It works okay when I store dates they are stored in the server's local timezone. However when retrieving the data Rails converts it to UTC, so for example <code>Post.find(1).posted</code> returns <code>2016-02-02 18:06:48 UTC</code> but it is actually stored as <code>2016-02-02 13:06:48</code> in the database.</p>
  
  <p>How can I keep Rails from converting it to UTC?</p>
  
  <p>I thought that setting the application time zone to the server's local time zone will help so I wanted to set <code>config.time_zone</code> to the server's local time zone and tried with:</p>
  
  <pre><code>config.time_zone = Time.now.zone
  </code></pre>
  
  <p>But the problem with it is that it returns a three character timezone code like <code>COT</code> and config.time_zone is expecting a Time Zone name like <code>Bogota</code></p>
  
  <p>How can I translate the three character code to the full time zone name? or, how can I get the local time zone name? or, how can I configure Rails to not convert the database dates to UTC?</p>