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:
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
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:
You simply need to modify the php_value date.timezone line to your required timezone. In my case, Europe/London. See screenshot for example.
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.