title: Help grokking Time and Time Zones in Rails 3
body: <p>I know there are a few dozen similar questions out there, not to mention countless articles on the Interwebs in general, but I'm still having a hard time understanding how Rails works with Time Zones internally.</p>
  
  <p>I currently have <code>config.time_zone = 'Eastern Time (US &amp; Canada)'</code> configured in my application file because that's where I and the other project administrators are. The company that owns the site is based in CA, so they will be in Pacific time. The application has a global audience and while we haven't done so yet we will eventually be implementing user preferred time zones.</p>
  
  <p>So my current questions:</p>
  
  <ol>
  <li><p>I know Rails magically transforms datetime column values to and from UTC when stored and retrieved respectively, but what is the proper way to view the local version of a given datetime attribute? </p></li>
  <li><p>When would one use <code>Time.now</code> versus <code>Time.zone.now</code> versus <code>Time.now.in_time_zone</code> versus <code>DateTime.now</code> versus <code>DateTime.now.in_time_zone</code>?</p></li>
  <li><p>What is the proper way to compare a given datetime attribute with the methods listed above or some other specific time relative to the currently configured time zone? With UTC? </p></li>
  <li><p>We will have some time-sensitive things like articles that need to be published at a specific time according to the application's time zone, so how do I make the application do that comparison in our specified timezone as opposed to the currently configured one (assuming a user timezones are implemented?)</p></li>
  <li><p>(<em>New Question</em>) What happens if I change <code>config.time_zone</code> to <code>UTC</code> at a later date? Do I have to reset all of my times in the database or does it otherwise affect old times?</p></li>
  </ol>