Index: i18n.rb =================================================================== --- i18n.rb (revision 3695) +++ i18n.rb (working copy) @@ -45,8 +45,23 @@ time = time.to_time if time.is_a?(String) zone = User.current.time_zone local = zone ? time.in_time_zone(zone) : (time.utc? ? time.localtime : time) - Setting.time_format.blank? ? ::I18n.l(local, :format => (include_date ? :default : :time)) : - ((include_date ? "#{format_date(time)} " : "") + "#{local.strftime(Setting.time_format)}") + if Setting.time_format.blank? + if include_date + Setting.date_format.blank? ? + ::I18n.l(local, :format => :default) : + local.strftime(Setting.date_format+' '+::I18n.t(:'time.formats.time')) + else + ::I18n.l(local, :format => :time) + end + else + if include_date + Setting.date_format.blank? ? + ::I18n.l(local, :format => ::I18n.t(:'date.formats.default')+' '+Setting.time_format) : + local.strftime(Setting.date_format+' '+Setting.time_format) + else + local.strftime(Setting.time_format) + end + end end def day_name(day)