On 21 June 2012 17:36, Fearless Fool <li...@ruby-forum.com> wrote: > I have isolated what appears to be a bug in the Rails extensions to > DateTime, but I don't know where to report it. > > I have a standalone file to demonstrate the bug, but the punch line is > that this code: > > TestRecord.create!(:f_datetime => (expected = DateTime.jd(2000000))) > found = TestRecord.first.f_datetime > > puts("expected == found => #{expected == found}") > puts("expected = #{expected.to_formatted_s(:rfc822)}") > puts("found = #{found.to_formatted_s(:rfc822)}") > > generates this response: > > expected == found => true > expected = Wed, 14 Sep 0763 00:00:00 +0000 > found = Sat, 14 Sep 0763 00:00:00 +0000 > > So. The dates are equal, but was that day a Wednesday or a Saturday?
Can you post the contents of schema.rb section for the table. Also it would be interesting to put in some inspect debug for expected and found. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.