Ad Widget

Collapse

5.4 Where to change the default date:time format (in dashboards, lastdata, etc)?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • writetome
    Junior Member
    • Sep 2021
    • 13

    #1

    5.4 Where to change the default date:time format (in dashboards, lastdata, etc)?

    I want to change the default datetime format, for example, change 12-hour time format (AM / PM) to 24-hour or change date format from mm.dd.yyyy to dd.mm.yyyy. But I can't do it in any way.

    I tried to
    • change system locales (dpkg-reconfigure locales and make en_US or en_GB or ru_RU or C.UTF8 as default),
    • change time zone in /etc/zabbix/apache.conf,
    • change settings in my user profile (Admin),
    • find locales/ru_ru.inc.php (there is no file with such name in 5.4),
    • find translateDefines.inc.php (the settings in this file can be changed, but it has no effect to zabbix web interface,
    • find and execute make_mo.sh (there is no file with such name in 5.4, installed from https://repo.zabbix.com/zabbix/5.4/u...u20.04_all.deb)
    Ubuntu 20.04 ARM, Zabbix 5.4.1
    Last edited by writetome; 22-09-2021, 18:59.
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    You need to extract some files from the source files if they are in the format specified in the localized files. If you are using Zabbix 5.4.1, please get the source file of 5.4.1.



    Extract this file and copy make_mo.sh located in the ui/locale directory to /usr/share/zabbix/locale. Then copy ui/locale/ru/LC_MESSAGES/frontend.po to /usr/share/zabbix/locale/ru/LC_MESSAGES. Rewrite the format msgstr in /usr/share/zabbix/locale/ru/LC_MESSAGES/frontend.po to the format you want to display.
    After rewriting, it should be reflected by changing to the /usr/share/zabbix/locale directory, running make_mo.sh, and restarting the web server or php-fpm.

    Comment

    • writetome
      Junior Member
      • Sep 2021
      • 13

      #3
      Originally posted by Atsushi
      You need to extract some files from the source files if they are in the format specified in the localized files. If you are using Zabbix 5.4.1, please get the source file of 5.4.1.

      https://cdn.zabbix.com/zabbix/source...x-5.4.1.tar.gz

      Extract this file and copy make_mo.sh located in the ui/locale directory to /usr/share/zabbix/locale. Then copy ui/locale/ru/LC_MESSAGES/frontend.po to /usr/share/zabbix/locale/ru/LC_MESSAGES. Rewrite the format msgstr in /usr/share/zabbix/locale/ru/LC_MESSAGES/frontend.po to the format you want to display.
      After rewriting, it should be reflected by changing to the /usr/share/zabbix/locale directory, running make_mo.sh, and restarting the web server or php-fpm.
      It works! Thanks a lot.

      Some additional comments for posterity: to execute make_mo.sh you will need msgfmt (presumably it can be installed from "gettext" package - sudo apt install gettext or similarly) as it described in /usr/share/zabbix/locale/README. I executed make_mo.sh successfully via sudo.

      This instruction also works fine for 5.4.4.
      Last edited by writetome; 23-09-2021, 13:08.

      Comment

      Working...