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

    Details

    • Sprint:
      Sprint 5, Sprint 6, Sprint 7, Sprint 8, Sprint 9
    • Story Points:
      1

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: