tmcdonald wrote:Also let's check all the time settings on both servers:
Code: Select all
grep "date.timezone" /etc/php.ini
php -r 'echo date("D M j G:i:s T Y")."\n";'
date
ntpdate
Just realised Hong Kong is also not working. It is giving 0 even though there are alerts this morning.
Shanghai Nagios Core 3.51
[nagios@CNPUDAS011 ~]$ grep "date.timezone" /etc/php.ini
;
http://www.php.net/manual/en/datetime.c ... e.timezone
;date.timezone =
[nagios@CNPUDAS011 ~]$ php -r 'echo date("D M j G:i:s T Y")."\n";'
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in Command line code on line 1
Fri May 30 7:29:23 CST 2014
[nagios@CNPUDAS011 ~]$ date
Fri May 30 07:29:30 CST 2014
[nagios@CNPUDAS011 ~]$ ntpdate
30 May 07:29:37 ntpdate[18235]: no servers can be used, exiting
[nagios@CNPUDAS011 ~]$
HongKong Nagios Core 3.51
[nagios@HKICBS011 ~]$ grep "date.timezone" /etc/php.ini
;
http://www.php.net/manual/en/datetime.c ... e.timezone
;date.timezone =
[nagios@HKICBS011 ~]$ php -r 'echo date("D M j G:i:s T Y")."\n";'
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Hong_Kong' for 'HKT/8.0/no DST' instead in Command line code on line 1
Fri May 30 7:27:54 HKT 2014
[nagios@HKICBS011 ~]$ date
Fri May 30 07:28:04 HKT 2014
[nagios@HKICBS011 ~]$ ntpdate
30 May 07:28:09 ntpdate[17375]: no servers can be used, exiting
[nagios@HKICBS011 ~]$
Sorry I don't have access to the Nagios Core 3.23 that is working.