title: Formatting Active Record Timestamps for JSON API
body: <p>I have a failing test for a GET request — the issue lies with the way ActiveRecord's timestamps are formatted in the response. The RSpec test expects the data format to be <code>Mon, 29 Dec 2014 13:37:09 UTC +00:00,</code>, but it instead receives <code>2014-12-29T13:37:09Z</code>. Is there any way to change the formatting of the ActiveRecord timestamp, or what the RSpec test expects?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Here's the failing test:</p>
  
  <pre><code>describe 'GET /v1/tasks/:id' do 
    it 'returns an task by :id' do
      task = create(:task)
      get "/v1/tasks/#{task.id}"
  
      expect(response_json).to eq( 
        {
          'id' =&gt; task.id,
          'title' =&gt; task.title,
          'note' =&gt; task.note,
          'due_date' =&gt; task.due_date,
          'created_at' =&gt; task.created_at,
          'updated_at' =&gt; task.updated_at
        } 
      )
    end
  end
  </code></pre>
  
  <p>The test fails on <code>created_at</code> and <code>updated_at</code>. <code>response_json</code> is a helper method that parses the JSON response.</p>
  
  <p>Here's where the test fails:</p>
  
  <pre><code>   expected: {"id"=&gt;1, "title"=&gt;"MyString", "note"=&gt;"MyText", "due_date"=&gt;Mon, 29 Dec 2014, "created_at"=&gt;Mon, 29 Dec 2014 13:37:09 UTC +00:00, "updated_at"=&gt;Mon, 29 Dec 2014 13:37:09 UTC +00:00}
          got: {"id"=&gt;1, "title"=&gt;"MyString", "note"=&gt;"MyText", "due_date"=&gt;"2014-12-29", "created_at"=&gt;"2014-12-29T13:37:09Z", "updated_at"=&gt;"2014-12-29T13:37:09Z"}
  </code></pre>