Hi Team,
We have noticed the time shown by the graph, last check everything different from the local server time. Attached some screenshots for your reference.
Timezone set as America/Los_Angeles. But time in the graph and last check shows Asia/Dubai.
Are there any settings that need to change to reflect the timezone?
[root@qy-nagios-a ~]# timedatectl
Local time: Mon 2021-03-08 00:54:33 PST
Universal time: Mon 2021-03-08 08:54:33 UTC
RTC time: Mon 2021-03-08 08:54:33
Time zone: America/Los_Angeles (PST, -0800)
NTP enabled: no
NTP synchronized: yes
RTC in local TZ: no
DST active: no
Last DST change: DST ended at
Sun 2020-11-01 01:59:59 PDT
Sun 2020-11-01 01:00:00 PST
Next DST change: DST begins (the clock jumps one hour forward) at
Sun 2021-03-14 01:59:59 PST
Sun 2021-03-14 03:00:00 PDT
[root@qy-nagios-a ~]#
[root@qy-nagios-a ~]# date
Mon Mar 8 00:55:47 PST 2021
[root@qy-nagios-a ~]# cat /etc/php.ini | grep -i timezone
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/Los_Angeles
[root@qy-nagios-a ~]#
Thanks
graph time showing different compared to local time
-
- Posts: 353
- Joined: Mon Jul 22, 2013 10:31 pm
graph time showing different compared to local time
You do not have the required permissions to view the files attached to this post.
-
- Dreams In Code
- Posts: 7682
- Joined: Wed Feb 11, 2015 12:54 pm
Re: graph time showing different compared to local time
I believe the graphs use your browser TZ.
Are you using postgresql? If so, you may need to change the timezone setting in /var/lib/pgsql/data/postgresql.conf and then restart postgresql.
Also, check the MySQL TZ settings:
Are you using postgresql? If so, you may need to change the timezone setting in /var/lib/pgsql/data/postgresql.conf and then restart postgresql.
Also, check the MySQL TZ settings:
Code: Select all
mysql -h 127.0.0.1 -uroot -pnagiosxi -e 'SELECT NOW(); SELECT @@GLOBAL.time_zone, @@SESSION.time_zone;'
-
- Posts: 353
- Joined: Mon Jul 22, 2013 10:31 pm
Re: graph time showing different compared to local time
Hi Team,
Yes, the graphs use the browser TZ. We have verified it.
I think Nagiosxi should use the server TZ, not the browser TZ. In another region, the Nagiosxi graph timezone is the same as server timezone.
We are not using the Postgresql. Please see below the MySQL TZ settings:
[root@qy-nagios-a ~]# mysql -h 127.0.0.1 -uroot -pnagiosxi -e 'SELECT NOW(); SELECT @@GLOBAL.time_zone, @@SESSION.time_zone;'
+---------------------+
| NOW() |
+---------------------+
| 2021-03-08 22:25:16 |
+---------------------+
+--------------------+---------------------+
| @@GLOBAL.time_zone | @@SESSION.time_zone |
+--------------------+---------------------+
| SYSTEM | SYSTEM |
+--------------------+---------------------+
[root@qy-nagios-a ~]# date
Mon Mar 8 22:25:23 PST 2021
[root@qy-nagios-a ~]#
Thanks
Yes, the graphs use the browser TZ. We have verified it.
I think Nagiosxi should use the server TZ, not the browser TZ. In another region, the Nagiosxi graph timezone is the same as server timezone.
We are not using the Postgresql. Please see below the MySQL TZ settings:
[root@qy-nagios-a ~]# mysql -h 127.0.0.1 -uroot -pnagiosxi -e 'SELECT NOW(); SELECT @@GLOBAL.time_zone, @@SESSION.time_zone;'
+---------------------+
| NOW() |
+---------------------+
| 2021-03-08 22:25:16 |
+---------------------+
+--------------------+---------------------+
| @@GLOBAL.time_zone | @@SESSION.time_zone |
+--------------------+---------------------+
| SYSTEM | SYSTEM |
+--------------------+---------------------+
[root@qy-nagios-a ~]# date
Mon Mar 8 22:25:23 PST 2021
[root@qy-nagios-a ~]#
Thanks
-
- Dreams In Code
- Posts: 7682
- Joined: Wed Feb 11, 2015 12:54 pm
Re: graph time showing different compared to local time
That's the way it was coded , I've previously submitted a feature request to not use the browser TZ but it hasn't been implemented yet.
Is the server in the same TZ as the browser? If so, then it would match.In another region, the Nagiosxi graph timezone is the same as server timezone.