<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -187,7 +187,7 @@ module Paperclip
     # lives in the &lt;attachment&gt;_updated_at attribute of the model.
     def updated_at
       time = instance_read(:updated_at)
-      time &amp;&amp; time.to_i
+      time &amp;&amp; time.to_f.to_i
     end
 
     # Paths and URLs can have a number of variables interpolated into them</diff>
      <filename>lib/paperclip/attachment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -531,9 +531,10 @@ class AttachmentTest &lt; Test::Unit::TestCase
         @attachment.stubs(:instance_read).with(:file_name).returns(&quot;5k.png&quot;)
         @attachment.stubs(:instance_read).with(:content_type).returns(&quot;image/png&quot;)
         @attachment.stubs(:instance_read).with(:file_size).returns(12345)
-        now = Time.now
-        Time.stubs(:now).returns(now)
-        @attachment.stubs(:instance_read).with(:updated_at).returns(Time.now)
+        dtnow = DateTime.now
+        @now = Time.now
+        Time.stubs(:now).returns(@now)
+        @attachment.stubs(:instance_read).with(:updated_at).returns(dtnow)
       end
 
       should &quot;return a correct url even if the file does not exist&quot; do
@@ -542,11 +543,11 @@ class AttachmentTest &lt; Test::Unit::TestCase
       end
 
       should &quot;make sure the updated_at mtime is in the url if it is defined&quot; do
-        assert_match %r{#{Time.now.to_i}$}, @attachment.url(:blah)
+        assert_match %r{#{@now.to_i}$}, @attachment.url(:blah)
       end
 
       should &quot;make sure the updated_at mtime is NOT in the url if false is passed to the url method&quot; do
-        assert_no_match %r{#{Time.now.to_i}$}, @attachment.url(:blah, false)
+        assert_no_match %r{#{@now.to_i}$}, @attachment.url(:blah, false)
       end
 
       context &quot;with the updated_at field removed&quot; do</diff>
      <filename>test/attachment_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a05fb27d749300626c9fd7f5f0acf7b177d720b8</id>
    </parent>
  </parents>
  <author>
    <name>Jon Yurek</name>
    <email>jyurek@thoughtbot.com</email>
  </author>
  <url>http://github.com/square/paperclip/commit/af7a99c5f0105a00cd3da88defad1369def0317a</url>
  <id>af7a99c5f0105a00cd3da88defad1369def0317a</id>
  <committed-date>2009-09-03T09:30:07-07:00</committed-date>
  <authored-date>2009-09-03T09:30:07-07:00</authored-date>
  <message>Fixed bug with DateTimes not having a #to_i method.</message>
  <tree>8e4e57e70ea568ffc417173e622359a917f9e40a</tree>
  <committer>
    <name>Jon Yurek</name>
    <email>jyurek@thoughtbot.com</email>
  </committer>
</commit>
