Fixed test failures on wiki_page updated_on eager loading (#10996).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9727 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-05-26 19:35:25 +00:00
parent 189be55235
commit 9aef7a3242
1 changed files with 1 additions and 1 deletions

View 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