Timezone that the server is supposed to be in is US Central. But Nagios is reporting everything 6 hours ahead. Here are my settings:
The following is correct (currently it is 2:31PM CST):
[root@nagios ~]# date
Tue Nov 21 14:31:46 CST 2017
[root@nagios ~]# ll /etc/localtime
lrwxrwxrwx 1 root root 30 Sep 20 09:42 /etc/localtime -> /usr/share/zoneinfo/US/Central
[root@nagios ~]# cat /etc/php.ini | grep date.time
; http://php.net/date.timezone
date.timezone = Central
Timezone in System Settings is, "Central Time."
The issue is:
* My "Service Status Detail" is always off by 6 hours. When a service should be down for 10 minutes, it says that the service has been down for "6h 10m 0s".
* "System Status" reports that it was last updated at 2017-11-21 20:32:51, when it should be 2017-11-21 14:32:51.
Is there another location for time settings that we are missing? Any other ideas?
Time is off by exactly 6 hours
Re: Time is off by exactly 6 hours
Try changing this:
to this:
in the php.ini file, and restart apache:
http://php.net/manual/en/timezones.others.php
If this is an option, reboot the server as well.
Are you using local or offloaded mysql db? What's the mysql time?
Code: Select all
date.timezone = CentralCode: Select all
date.timezone = US/CentralCode: Select all
service httpd restartIf this is an option, reboot the server as well.
Are you using local or offloaded mysql db? What's the mysql time?
Code: Select all
echo 'select now();' | mysql -t -uroot -pnagiosxi mysqlBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Time is off by exactly 6 hours
Changing php.ini to US/Central fixed it actually. Thank you!
Time on mysql was correct:
+---------------------+
| now() |
+---------------------+
| 2017-11-21 15:15:56 |
+---------------------+
Time on mysql was correct:
+---------------------+
| now() |
+---------------------+
| 2017-11-21 15:15:56 |
+---------------------+
Re: Time is off by exactly 6 hours
I am glad I could help! 
I am locking this topic. If you have any more questions/issues, please start a new thread. Thank you!
I am locking this topic. If you have any more questions/issues, please start a new thread. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!