]> source.dussan.org Git - redmine.git/commitdiff
Rails3 compat.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 1 Jan 2012 17:58:14 +0000 (17:58 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 1 Jan 2012 17:58:14 +0000 (17:58 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8459 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/wiki_page.rb

index c6e5f21ed31d1bc01c153233319e076da1cb4caa..5508bd21809e5460c96dae77ebf9a3d640fac72f 100644 (file)
@@ -137,7 +137,10 @@ class WikiPage < ActiveRecord::Base
     unless @updated_on
       if time = read_attribute(:updated_on)
         # content updated_on was eager loaded with the page
-        @updated_on = Time.parse(time) rescue nil
+        begin
+          @updated_on = Time.zone ? Time.zone.parse(time.to_s) : Time.parse(time.to_s)
+        rescue
+        end
       else
         @updated_on = content && content.updated_on
       end