Zabbix Monitoring - Configuration of timezone and date in php files and zambia.conf

Resolving an issue that caused the time on my Zabbix Appliance 3.0 graphs to be wrong

Zabbix Monitoring Solution Logo

Around two months after the completion of my Zabbix installation, I figured it was about time I resolved one of the first issues I faced. WHY IS THE TIME WRONG ON MY ZABBIX GRAPHS?

Never truer has it been that allowing some time to pass (no pun intended) can allow you to see the answer much faster.

Having researched this problem a lot,  I had followed all of the readily available instructions I could find. Or so I thought.

Either Zabbix have ammended their documentation, or I had just somehow skipped on past it during configuration.

What I had previously tried, that may assist you:

I had attempted syncing the hardware clock to the system clock using the command:

hwclock –hctosys

If necessary, you can also update the hardware clock manually, then sync these changes back to the system clock:

hwclock –set –date=”MM/DD/YYYY HH:MM” –localtime
hwclock –hctosys¬†

I had also tried making changes to the date.timezone line in my php.ini file, located at /etc/php5/apache2/php.ini.

Linux guide to changing the timezone, if you would like to try anything else: http://www.wikihow.com/Change-the-Timezone-in-Linux

Anyway, enough of what I tried that didn’t work.

The file I needed to change was located at:

/etc/apache2/conf-enabled/zabbix.conf

You simply need to modify the php_value date.timezone line to your required timezone. In my case, Europe/London. See screenshot for example.

Zabbix timezone fix - zabbix.conf

Once this was changed, I rebooted the server with shutdown -r 0 although if you’re in an environment that you can’t just restart your Zabbix server, be sure to use the sudo service zabbix-server restart command instead. You may also need to restart the apache2 service, with sudo service apache2 restart.

Anyway… even though the answer ended up being found in the Zabbix Documentation (cringe…), I thought i’d share the source of my pain in case someone else could benefit.

2 thoughts on “Resolving an issue that caused the time on my Zabbix Appliance 3.0 graphs to be wrong

  1. Thanks for this, just to make you aware there is a capital Z that shouldn’t be there. I copied and pasted the path and it didn’t work
    /etc/apache2/conf-enabled/Zabbix.conf

    should be:

    /etc/apache2/conf-enabled/zabbix.conf

Leave a Reply

Your email address will not be published. Required fields are marked *