]> source.dussan.org Git - redmine.git/commitdiff
Fixed test failures on wiki_page updated_on eager loading (#10996).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 26 May 2012 19:35:25 +0000 (19:35 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 26 May 2012 19:35:25 +0000 (19:35 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9727 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/wiki_page.rb

index a216a014fac530faae313ec15f616d91933a1ad6..2f7803f2aa99b08f19117b6538d496da39f8afa8 100644 (file)
@@ -143,7 +143,7 @@ class WikiPage < ActiveRecord::Base
       if time = read_attribute(:updated_on)
         # content updated_on was eager loaded with the page
         begin
-          @updated_on = Time.zone ? Time.zone.parse(time.to_s) : Time.parse(time.to_s)
+          @updated_on = (self.class.default_timezone == :utc ? Time.parse(time.to_s).utc : Time.parse(time.to_s).localtime)
         rescue
         end
       else