title: Rails Time inconsistencies with rspec
body: <p>I'm working with Time in Rails and using the following code to set up the start date and end date of a project:</p>
  
  <pre><code>start_date ||= Time.now
  end_date = start_date + goal_months.months
  </code></pre>
  
  <p>I then clone the object and I'm writing rspec tests to confirm that the attributes match in the copy.  <strike>The end dates match:</p>
  
  <pre><code>original[end_date]:  2011-08-24 18:24:53 UTC
  clone[end_date]:     2011-08-24 18:24:53 UTC
  </code></pre>
  
  <p></strike></p>
  
  <p>but the spec gives me an error on the start dates:</p>
  
  <pre><code>expected: Wed Aug 24 18:24:53 UTC 2011,
       got: Wed, 24 Aug 2011 18:24:53 UTC +00:00 (using ==)
  </code></pre>
  
  <p>It's clear the dates are the same, just formatted differently.  How is it that they end up getting stored differently in the database, and how do I get them to match?  I've tried it with DateTime as well with the same results.</p>
  
  <p><strong>Correction:</strong>  The end dates don't match either.  They print out the same, but rspec errors out on them as well.  When I print out the start date and end date, the values come out in different formats:</p>
  
  <pre><code>start date: 2010-08-24T19:00:24+00:00
  end date: 2011-08-24 19:00:24 UTC
  </code></pre>