Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-12019

Frontend incorrectly displays calendar in maintenance edit form when system time zone is ahead of PHP timezone

XMLWordPrintable

    • Sprint 5, Sprint 6, Sprint 7, Sprint 8, Sprint 9
    • 1

      Definitely affects trunk, most likely affects other versions too, but I have not checked.

      To reproduce you need to set different time zones in php.ini file and system-wide, system time zone must be ahead of PHP date.timezone, for example:

      $ cat /etc/php/7.0/apache2/php.ini | grep 'date\.timezone ='
      date.timezone = Europe/Riga
      
      $ cat /etc/timezone
      Asia/Tokyo
      

      Then go to Configuration->Maintenance and press Create maintenance period.

      Press the little calendar button next to Active since or Active till settings.

      You will see that day in the calendar is by one less than day in the input field:

      If you press Done this incorrect day will propagate into input field:

      P.S. Since web server and web browser are running on the same system in my case, I don't know which of them is affected by system settings. But these is clearly some JavaScript client - JavaScript server - PHP magic going on.
      P.P.S. Strangely, this calendar selector is used in many places across frontend (e.g. in graphs and screens), but only maintenance form seems to be affected.

        1. calendar.png
          calendar.png
          57 kB
        2. done.png
          done.png
          41 kB

            Unassigned Unassigned
            glebs.ivanovskis Glebs Ivanovskis (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: