<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -23,8 +23,8 @@ module ActiveRecord
           write_attribute('created_at', t) if respond_to?(:created_at) &amp;&amp; created_at.nil?
           write_attribute('created_on', t) if respond_to?(:created_on) &amp;&amp; created_on.nil?
 
-          write_attribute('updated_at', t) if respond_to?(:updated_at)
-          write_attribute('updated_on', t) if respond_to?(:updated_on)
+          write_attribute('updated_at', t) if respond_to?(:updated_at) &amp;&amp; updated_at.nil?
+          write_attribute('updated_on', t) if respond_to?(:updated_on) &amp;&amp; updated_on.nil?
         end
         create_without_timestamps
       end</diff>
      <filename>activerecord/lib/active_record/timestamp.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,6 +16,7 @@ require 'models/post'
 require 'models/comment'
 require 'models/minimalistic'
 require 'models/warehouse_thing'
+require 'models/parrot'
 require 'rexml/document'
 
 class Category &lt; ActiveRecord::Base; end
@@ -2071,6 +2072,15 @@ class BasicsTest &lt; ActiveRecord::TestCase
     ActiveRecord::Base.logger = original_logger
   end
 
+  def test_create_with_custom_timestamps
+    custom_datetime = 1.hour.ago.beginning_of_day
+
+    %w(created_at created_on updated_at updated_on).each do |attribute|
+      parrot = LiveParrot.create(:name =&gt; &quot;colombian&quot;, attribute =&gt; custom_datetime)
+      assert_equal custom_datetime, parrot[attribute]
+    end
+  end
+
   private
     def with_kcode(kcode)
       if RUBY_VERSION &lt; '1.9'</diff>
      <filename>activerecord/test/cases/base_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>70456aed31ae64b36563fc5d32ac114e0a095231</id>
    </parent>
  </parents>
  <author>
    <name>Luis Hurtado</name>
    <email>luis@time4code.com</email>
  </author>
  <url>http://github.com/rails/rails/commit/63aac338332a06d3c9e28dde7954679703ec7620</url>
  <id>63aac338332a06d3c9e28dde7954679703ec7620</id>
  <committed-date>2008-12-22T07:19:33-08:00</committed-date>
  <authored-date>2008-12-22T07:18:43-08:00</authored-date>
  <message>Ensure of Model#create support custom updated_at and updated_on attributes [#1612 state:resolved]

Signed-off-by: Pratik Naik &lt;pratiknaik@gmail.com&gt;</message>
  <tree>29444858c43d6f3a22e9f50ed5e2252ecb6e862a</tree>
  <committer>
    <name>Pratik Naik</name>
    <email>pratiknaik@gmail.com</email>
  </committer>
</commit>
