Hi,
Already done if you take a look at the previous posts :
I performed the steps :
1) Setting the System Timezone
2) PHP Timezone
bug on duration
Re: bug on duration
Please run the 5 commands again so we can see what everything is currently set to -
Code: Select all
grep "date.timezone" /etc/php.ini
ls -l /etc/localtime
php -r 'echo date("D M j G:i:s T Y")."\n";'
date
mysql -unagiosxi -pn@gweb -e "SELECT NOW();"
Former Nagios Employee
-
Frédéric GRANAT
- Posts: 445
- Joined: Mon Nov 19, 2012 11:36 am
Re: bug on duration
Hi,
I performed the last step : "Syncing the system clock with NTP" of Changing_The_XI_System_Time.pdf
That doesn' solve my problem :
I performed the last step : "Syncing the system clock with NTP" of Changing_The_XI_System_Time.pdf
That doesn' solve my problem :
Code: Select all
[root@nagiosxi ~]# grep "date.timezone" /etc/php.ini
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
date.timezone = Europe/Paris
[root@nagiosxi ~]# ls -l /etc/localtime
lrwxrwxrwx 1 root root 32 Jan 9 09:55 /etc/localtime -> /usr/share/zoneinfo/Europe/Paris
[root@nagiosxi ~]# php -r 'echo date("D M j G:i:s T Y")."\n";'
Fri Jan 20 9:50:46 CET 2017
[root@nagiosxi ~]# date
Fri Jan 20 09:50:51 CET 2017
[root@nagiosxi ~]# mysql -unagiosxi -pn@gweb -e "SELECT NOW();"
+---------------------+
| NOW() |
+---------------------+
| 2017-01-20 09:50:57 |
+---------------------+
[root@nagiosxi ~]#
Re: bug on duration
Got it - everything is lining up at this point. I would like to take a step back to a question I made earlier -
You may need to restart nagios / ndo2db / mysql / httpd after adjusting the time all around, as they may be holding pre-cached timezones. Are you still experiencing the issue after doing so?Is your database hosted local, or offloaded?
Former Nagios Employee
-
Frédéric GRANAT
- Posts: 445
- Joined: Mon Nov 19, 2012 11:36 am
Re: bug on duration
Hi,
As you can see date always displays CET whereas I set Timezone=Europe/Paris
Code: Select all
[root@nagiosxi ~]# service ndo2db restart
Stopping ndo2db: done.
Starting ndo2db: done.
[root@nagiosxi ~]# service mysqld restart
Stopping mysqld: [ OK ]
Starting mysqld: [ OK ]
[root@nagiosxi ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using nagiosxi.cg.ahp for ServerName
[ OK ]
[root@nagiosxi ~]# date
Mon Jan 23 12:13:53 CET 2017
[root@nagiosxi ~]#
Re: bug on duration
France is in the CET timezone so that should be OK.
Is the issue for the negative times for the duration fixed now?
Is the issue for the negative times for the duration fixed now?
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
Frédéric GRANAT
- Posts: 445
- Joined: Mon Nov 19, 2012 11:36 am
Re: bug on duration
Problem is solved (difference between CET and Europe\Paris was disturbing me, but if you say it's normal)
Re: bug on duration
Glad that it is working now. I will mark this post as solved and lock it up but if you have a new issue, please open a new post.
Be sure to check out our Knowledgebase for helpful articles and solutions!