title: Convert UTC to local time in Rails 3
body: <p>I'm having trouble converting a UTC <code>Time</code> or <code>TimeWithZone</code> to local time in Rails 3.</p>
  
  <p>Say <code>moment</code> is some <code>Time</code> variable in UTC (e.g. <code>moment = Time.now.utc</code>). How do I convert <code>moment</code> to my time zone, taking care of DST (i.e. using EST/EDT)?</p>
  
  <p>More precisely, I'd like to printout "Monday March 14, 9 AM" if the time correspond to this morning 9 AM EDT and "Monday March 7, 9 AM" if the time was 9 AM EST last monday.</p>
  
  <p>Hopefully there's another way?</p>
  
  <p><strong>Edit</strong>: <a href="https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/6574">I first thought</a> that "EDT" should be a recognized timezone, but "EDT" is not an actual timezone, more like the state of a timezone. For instance it would not make any sense to ask for <code>Time.utc(2011,1,1).in_time_zone("EDT")</code>. It is a bit confusing, as "EST" <strong>is</strong> an actual timezone, used in a few places that do not use Daylight savings time and are (UTC-5) yearlong.</p>