always-obey-date-format.diff

Ebrahim Mohammadi, 2010-12-11 10:56

Download (1008 Bytes)

View differences:

lib/redmine/i18n.rb (working copy)
41 41
    end
42 42
    
43 43
    def format_time(time, include_date = true)
44
		(include_date ? "#{format_date(time)} " : "") + format_time_only(time)
45
    end
46

  
47
    def format_time_only(time)
44 48
      return nil unless time
45 49
      time = time.to_time if time.is_a?(String)
46 50
      zone = User.current.time_zone
47 51
      local = zone ? time.in_time_zone(zone) : (time.utc? ? time.localtime : time)
48
      Setting.time_format.blank? ? ::I18n.l(local, :count => local.strftime('%d'), :format => (include_date ? :default : :time)) : 
49
                                   ((include_date ? "#{format_date(time)} " : "") + "#{local.strftime(Setting.time_format)}")
52
      Setting.time_format.blank? ? ::I18n.l(local, :count => local.strftime('%d'), :format => :time) : local.strftime(Setting.time_format)
50 53
    end
51 54

  
52 55
    def day_name(day)