title: How to display in Ruby on Rails date and time in the format of local timezone
body: <p>I'm new to Ruby on Rails and I just did a Blog tutorial to learn the basics. 
  What I need to know now how to display in a post the date/time of creation and show also how old is it. I tried something but I cannot understand how to display the current local time of creation. Like I create the post in the US but in DK I see the local time.
  However, I would like to extend this to show also the post in a chronological way.</p>
  
  <p>The code:</p>
  
  <pre><code>    &lt;h2&gt;&lt;%= @post.title %&gt;&lt;/h2&gt;
      &lt;p&gt;&lt;%= @post.body %&gt;&lt;/p&gt;
      &lt;p&gt; &lt;%= @post.created_at.strftime('%B %d %Y, %l:%M%P, %z') %&gt;&lt;/p&gt;
      &lt;hr&gt;
  &lt;%= link_to 'Edit', edit_post_path(@post), :class =&gt; 'btn btn-default'%&gt;
  &lt;%= link_to 'Delete', post_path(@post),
              method: :delete,
              data: {confirm: 'Are you sure?'},
              :class =&gt; 'btn btn-danger'
  %&gt;
  &lt;hr&gt;
  
  &lt;%= render 'comments/comments' %&gt;
  &lt;%= render 'comments/form' %&gt;
  </code></pre>