Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Use I18n.l always

Oliver Günther293a8e016394
diff --git a/lib_static/redmine/i18n.rb b/lib_static/redmine/i18n.rb
index e123bb2d740..de535cf528f 100644
--- a/lib_static/redmine/i18n.rb
+++ b/lib_static/redmine/i18n.rb
@@ -86,10 +86,10 @@ module Redmine
elsif date_or_time.instance_of?(Date) # Important not to use is_a? as it will match DateTime
date_or_time
else
- in_user_zone(time).to_date
+ in_user_zone(date_or_time).to_date
end
- format.blank? ? ::I18n.l(local) : date.strftime(format)
+ format.present? ? ::I18n.l(local, format:) : ::I18n.l(local)
end
##