Ad Widget

Collapse

Timezone Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • seitz.166
    Junior Member
    • Mar 2016
    • 7

    #1

    Timezone Problem

    I am running the Zabbix 3.0 virtual appliance. I really like that it is running on Ubuntu now. However, I'm having an issue with the time zones. I've been researching this for two days and can't find a working answer.

    The hwclock and date are showing up correctly.

    appliance@zabbix:/etc/php5/apache2$ sudo hwclock
    Tue 15 Mar 2016 02:21:22 PM EDT -1.143197 seconds
    appliance@zabbix:/etc/php5/apache2$ date
    Tue Mar 15 10:21:25 EDT 2016
    appliance@zabbix:/etc/php5/apache2$ date -u
    Tue Mar 15 14:21:28 UTC 2016

    I have also changed the timezone setting in php.ini

    date.timezone = America/New_York

    I'm not sure what else to try. I read somewhere there may be a bug, due to the '/' in America/New_York commenting things out. I'm not sure if that is still an issue in 3.0.

    Any help would be appreciated. I'm at a loss.
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    All timestams in zabbix DB are in UTC so you have wrong time.

    14:21 Eastern Time (ET) it is 18:21 UTC and such time (UTC) you should have in hwclock. First copy to /usr/share/zoneinfo/America/New_York to and setup time and copy it to hwclock. Second step is time zone in /etc/php.ini.
    date.timezone=America/New_York
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • seitz.166
      Junior Member
      • Mar 2016
      • 7

      #3
      I copied /usr/share/zoneinfo/America/New_York over to /etc/localtime again. I synced the hardware clock and double checked the /etc/php5/apache2/php.ini file was set to date.timezone=America/New_York. I then restarted the apache2 and zabbix-server services.

      I get this when I check my times:

      appliance@zabbix:~$ sudo hwclock
      Wed 16 Mar 2016 12:46:11 PM EDT -0.973933 seconds
      appliance@zabbix:~$ sudo hwclock -u
      Wed 16 Mar 2016 12:46:32 PM EDT -0.895835 seconds
      appliance@zabbix:~$ date
      Wed Mar 16 08:46:36 EDT 2016

      However, when I go into graphs in Zabbix, they are displaying as 14:46. It's only two hours in the future now, but still incorrect. Any other ideas as to what could be causing this?

      Comment

      • seitz.166
        Junior Member
        • Mar 2016
        • 7

        #4
        I actually misread the time on the graphs. It is still displaying 6 hours in the future.

        Comment

        • seitz.166
          Junior Member
          • Mar 2016
          • 7

          #5
          Should my hardware clock and date show as UTC instead of EDT? If so, how do I set these to UTC?

          Comment

          • rumbLe
            Junior Member
            • Feb 2016
            • 4

            #6
            Originally posted by seitz.166
            I am running the Zabbix 3.0 virtual appliance. I really like that it is running on Ubuntu now. However, I'm having an issue with the time zones. I've been researching this for two days and can't find a working answer.

            The hwclock and date are showing up correctly.

            appliance@zabbix:/etc/php5/apache2$ sudo hwclock
            Tue 15 Mar 2016 02:21:22 PM EDT -1.143197 seconds
            appliance@zabbix:/etc/php5/apache2$ date
            Tue Mar 15 10:21:25 EDT 2016
            appliance@zabbix:/etc/php5/apache2$ date -u
            Tue Mar 15 14:21:28 UTC 2016

            I have also changed the timezone setting in php.ini

            date.timezone = America/New_York

            I'm not sure what else to try. I read somewhere there may be a bug, due to the '/' in America/New_York commenting things out. I'm not sure if that is still an issue in 3.0.

            Any help would be appreciated. I'm at a loss.
            Hi, did you try to change the timezone in: /etc/apache2/conf-available/zabbix.conf

            Comment

            • seitz.166
              Junior Member
              • Mar 2016
              • 7

              #7
              Rumble...You are awesome. That fixed the issue. I thought there might be another config file, but I didn't know where.

              Comment

              • rumbLe
                Junior Member
                • Feb 2016
                • 4

                #8
                Originally posted by seitz.166
                Rumble...You are awesome. That fixed the issue. I thought there might be another config file, but I didn't know where.
                No problem. Glad I could help.

                I had the same problem as you, and it took me a while to find the solution.

                https://www.zabbix.com/documentation...al/appliance?s[]

                Comment

                • Geoclimate
                  Junior Member
                  • Aug 2020
                  • 2

                  #9
                  Hi,
                  Zabbix 5.0.2 virtual appliance

                  Here's my solution

                  1.
                  Change time zone

                  cp /usr/share/zoneinfo/Europe/Warsaw /etc/localtime


                  2.
                  find file zabbix.conf

                  find / -name zabbix.conf


                  3.
                  edit file zabbix.conf
                  (in my case) /etc/php-fpm.d/zabbix.conf

                  vi /etc/php-fpm.d/zabbix.conf

                  find inside
                  php_value[date.timezone] = Europe/Warsaw

                  Comment

                  • christophergatewood
                    Junior Member
                    • Sep 2018
                    • 1

                    #10
                    Hello,

                    I was reading this some and then there were others that are pretty old so I thought I'd ask if anyone knew if it mattered when you have proxies.

                    We currently use Zabbix 4.0 and have proxies everywhere. I recently did a change to have the primary and backup zabbix front end and database time zone change on RHEL to central time. I never made the changes to the proxies to match up to the front ends and database operating systems.Does it matter that I would have Central, Eastern, and Pacific time zones configured on the Red Hat 7 OS that run Zabbix proxy?

                    Comment

                    Working...