On Thu, Feb 16, 2006 at 04:25:55PM +0000, Dominic Mitchell wrote: > Aha! Got it: > > http://dev.rubyonrails.org/ticket/2873 > > Many thanks for your help, Victor. I'll take it up with that ticket...
For reference, this is the patch that I used to fix it. It's not perfect as it means that the time on the create article screen is still wrong, but it gets fixed as soon as you save... -Dom Index: app/models/article.rb =================================================================== --- app/models/article.rb (revision 728) +++ app/models/article.rb (working copy) @@ -94,6 +94,9 @@ self.extended_html = HtmlEngine.transform(extended, self.text_filter) end + # Work around PostgreSQL adaptor (http://dev.rubyonrails.org/ticket/2873) + before_create { |art| art.created_at = Time.now } + def self.time_delta(year, month = nil, day = nil) from = Time.mktime(year, month || 1, day || 1) Index: app/models/comment.rb =================================================================== --- app/models/comment.rb (revision 728) +++ app/models/comment.rb (working copy) @@ -29,4 +29,7 @@ self.body_html = HtmlEngine.transform(body, config["comment_text_filter"], [:filter_html]) end + # Work around PostgreSQL adaptor (http://dev.rubyonrails.org/ticket/2873) + before_create { |art| art.created_at = Time.now } + end _______________________________________________ Typo-list mailing list Typo-list@rubyforge.org http://rubyforge.org/mailman/listinfo/typo-list