knowledge_base_human_date_helper.rb 452 B

12345678910111213
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. module KnowledgeBaseHumanDateHelper
  3. def human_time_tag(time, locale: system_locale_via_uri)
  4. timezone = Setting.get('timezone_default')
  5. time_in_zone = time.in_time_zone(timezone)
  6. locale_name = locale.locale
  7. time_tag time, title: time_in_zone do
  8. Translation.timestamp(locale_name, timezone, time_in_zone, append_timezone: false)
  9. end
  10. end
  11. end