i recently built a new Cacti machine image using Cacti 1.2.22, Ubuntu 20.04, PHP 7.4.3, Apache 2.4.41, Maria DB 15.1
all graphs seem to display with the local machine timezone (i.e the timezone of the machine I am viewing them with - not the Ubuntu Server hosting Cacti). If I change the timezone of my machine, then the timezone of the graphs change. As I am running the Cacti instance in a different timezone, I want to have Cacti display its timezone rather than mine. I have always been able to do this previously. The timezone of the server is set correctly to America/Los_Angeles, as are the php.ini timezone settings in both the apache2 and cli php.ini files. The mariadb shows the correct timezone (PDT), and if i run a basic php script via the browser, that too displays the local timezone
MariaDB [(none)]> show global variables like '%time_zone';
| system_time_zone | PDT |
| time_zone | SYSTEM |
$ timedatectl
Local time: Fri 2022-09-02 07:39:32 PDT
Universal time: Fri 2022-09-02 14:39:32 UTC
RTC time: Fri 2022-09-02 14:39:32
Time zone: America/Los_Angeles (PDT, -0700)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
I've also tried editing the graph_image.php to assign the timezone directly to that PHP script "putenv('TZ=America/Los_Angeles');"
I've tried 2 different browsers (Chrome and Safari), and different Macs running 12.5.1 and 11.6.8 respectively.
I also have the data collector set to Amerca/Los_Angeles, and the Cacti logs are appearing in the America/Los_Angeles time zone
Any suggestions? Thanks in advance!
timezone of web interface always uses the local machine time
Moderators: Developers, Moderators
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: timezone of web interface always uses the local machine time
If you want to see the graphs in the servers timezone, I think we need a feature request on GitHub. We added auto-detection of the client's timezone in a 1.2.x release recently, but did not give the user the ability to bypass that. So, you'll need to log it. Until then, you can disable by editing the lib/rrd.php file and commenting out the calls to the timezone adjustment.
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Re: timezone of web interface always uses the local machine time
thanks, I appreciate the response. I'll put in the feature request, but your workaround will make life a lot easier for now
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: timezone of web interface always uses the local machine time
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Who is online
Users browsing this forum: No registered users and 5 guests