WebGUI is not displaying the correct time/timezone

I’m not seeing any errors when I run the validate script in the CLI and/or check the validate page in the webgui, but the time on the graphs is not showing the correct time/timezone. I forgot the path of the file that I need to edit to set the correct timezone from the CLI. Is it possible to change the time/timezone via the GUI?

Thanks.

Hi,

No, is not possible. You must edit the php.ini file (for cli and web) and your mysql timezone (usually it took from system timezone).

Thank you, what is the path of the file that I need to modify in the CLI?

It depends on what OS.

Usually /etc/php/ or /etc/phpVERSION/ or something like that

I am using the pre-built image/appliance that was linked to github which appears to be ubuntu 18.04 (librenms-ubuntu-18.04-amd64.ova)

edit- etc/php then I run ‘ls’ and see 7.2, the 7.2 directory shows cli fpm and mods-available

then the 2 php ini in cli/ and fpm/

Both php.ini files need to be modified?

Yes, both should have the same timezone. Also your mysql/system timezones

This really needs to be an option in the WebGUI. Making changes in 3 places via CLI makes 0 sense.

This is a setting of PHP, which is a prerequisite for LibreNMS to work. So we can hardly rely on LibreNMS to configure it …

Apparently it is also a setting for mysql. I shouldn’t have to go change the timezone in 3 places. While I understand Libre can’t change the timezone, the setup seems very broken/inefficient if changes need to be made in multiple places.

Hi

Yes, MySQL also has such a setting and it has to be updated. We all agree anything can be improved, and you are absolutely free to help the LibreNMS team improve the code.

As you know, the project is open source and exists only because all the LibreNMS team is doing it on their spare time.

PipoCanaja

2 Likes

@dt-lib Feel free to submit code changes any time at GitHub - librenms/librenms: Community-based GPL-licensed network monitoring system

Every one here volunteers time and effort to keep the project going.

1 Like

Not a programmer, I don’t know how LibreNMS works with the server it’s running on, meaning, I wasn’t aware that LibreNMS couldn’t have a GUI option that changes the time in all places that are needed on the server that it is running on. Thanks.

Which file needs to be updated in order for the GUI time to be accurate? Is it all locations or only the PHP files? For example, if mysql timezone isn’t changed but php.ini files are changed/updated, will the GUI report the correct time?

Setting the timezone is a part on the install process and just like any software or install you need to set it up. You do know this free software?

Yes, I know it is free software, but I didn’t know how changes were made. I’m not a programmer, I don’t know the norms, but I do now, thanks.

Did you see that I am using an appliance? I didn’t have to set anything up. I always set the timezone when given the option.

What appliance? Are talking about the images? An appliance and VM images are two completely different things.

I downloaded the image from the link below, I thought I read the word appliance somewhere, but I guess I was mistaken.

This is the image I used, [librenms-ubuntu-18.04-amd64.ova] 1.46 GB

Thanks.

@dt-lib you only need to change the system timezone and Done > Web GUI displaying/updated the correct date time
The syntax is as follows to set timezone and need to run as root user:
# timedatectl set-timezone time_zone
In this example, set timezone to Asia/Jakarta
# timedatectl set-timezone Asia/Jakarta
Verify new settings by typing the following two commands:
# date# ls -l /etc/localtime