Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boost may sometimes lose the Time Zone unexpectedly #4978

Closed
bmfmancini opened this issue Oct 25, 2022 · 2 comments
Closed

Boost may sometimes lose the Time Zone unexpectedly #4978

bmfmancini opened this issue Oct 25, 2022 · 2 comments
Labels
bug Undesired behaviour unverified Some days we don't have a clue

Comments

@bmfmancini
Copy link
Member

bmfmancini commented Oct 25, 2022

Hello Everyone
I am seeing the following behaviour in 1.2.22 and 1.2.23

The Gprint times ( To and From) are correct however the bottom time line of the graph is showing in GMT +4
I am in EST

image

I am seeing that the raw data in that time is the correct data

image

I have confirmed date and time is correct on both PHP and DB as well as poller timezone settings

Date Tue, 25 Oct 2022 16:27:18 -0400
Cacti Version 1.2.23
Cacti OS unix
RSA Fingerprint 9a:71:17:a2:e9:73:a6:3a:40:b2:d6:c9:59:85:a6:f6
NET-SNMP Version NET-SNMP version: 5.7.2
RRDtool Version Configured 1.8.0+
RRDtool Version Found 1.8.0

DB time

MariaDB [(none)]> select NOW();
+---------------------+
| NOW() |
+---------------------+
| 2022-10-25 16:28:24 |
+---------------------+
1 row in set (0.001 sec)

MariaDB [cacti]> select timezone from poller;
+-----------------+
| timezone |
+-----------------+
| America/Toronto |
| America/Toronto |
| America/Toronto |
| America/Toronto |
+-----------------+
4 rows in set (0.001 sec)

Server time is also correct

[root@cacti-main ~]# date
Tue Oct 25 16:29:04 EDT 2022

The request header is in GMT despite the client being set to EST
the time matches both the EST timezone listed in the gprint from and to
and matches the time stamps on the graph its like one of the timestamps are not being converted properly ?

image


GET /cacti/graph_json.php?rra_id=0&local_graph_id=651&graph_start=1666643400&graph_end=1666729800&graph_height=200&graph_width=700 HTTP/1.1
Host: 192.168.1.22
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: en-CA,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
X-Requested-With: XMLHttpRequest
Connection: keep-alive
Referer: http://192.168.1.22/cacti/graph_view.php?action=tree&node=tbranch-117&host_id=178&site_id=-1&host_template_id=-1&hgd=&hyper=true
Cookie: Cacti=v5roaas1029h41g1g3uiskuu8p; CactiDateTime=Tue Oct 25 2022 16:25:10 GMT-0400 (Eastern Daylight Saving Time); CactiTimeZone=-240


HTTP/1.1 200 OK
Date: Tue, 25 Oct 2022 20:31:04 GMT
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.3.33
X-Powered-By: PHP/7.3.33
Last-Modified: Tue, 25 Oct 2022 20:31:04 GMT
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: default-src *; img-src 'self'  data: blob:; style-src 'self' 'unsafe-inline' ; script-src 'self'  'unsafe-inline' ; frame-ancestors 'self'; worker-src 'self' ;
P3P: CP="CAO PSA OUR"
Cache-Control: max-age=15
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Content-Length: 169759
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: application/json

Also when running the graph in realtime the time stamps are correct

@thurban
Copy link
Contributor

thurban commented Oct 27, 2022

It looks like the boost update mechanism is loosing the timezone settings. We tried a fix for it that makes sure the timezone is being set before the actual rrdtool command is being executed.

The code pull request will follow soon

@seanmancini
Copy link
Contributor

This issue is corrected with the latest updates to lib/boost.php

@netniV netniV changed the title 1.2.22/1.2.23 Graph timezone issue Boost may sometimes lose the Time Zone unexpectedly Dec 31, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour unverified Some days we don't have a clue
Projects
None yet
Development

No branches or pull requests

3 participants