Ezeelogin GUI web interface is showing a different time than the system time.
Synchronizing ezeelogin GUI time with system time
Overview: This article addresses the issue of mismatched time display between the Ezeelogin GUI and the system time. The discrepancy often arises due to the default timezone setting in PHP. By modifying the timezone configuration in the PHP configuration file (/etc/php.ini) and restarting the HTTPD service, the GUI time can be synchronized with the system time. Creating PHP pages to display the current time allows verification of the correct time configuration. This ensures that both the Ezeelogin GUI and the system reflect the same accurate time.
There will be a difference in the time shown in GUI and the system. If we have not set it manually the time will be the default time, as shown in the following screenshots.
root@gateway:~# date
Tue May 11 12:00:17 IST 2021
When we access the php.info page it shows the default timezone as UTC.
Step 1. Add the PHP info page using the following steps;
root@gateway:~# vi $(awk '/^www_folder/ {print $2}' /usr/local/etc/ezlogin/ez.conf)info.php
<?php phpinfo(); ?>
Step 2. To set both GUI time and server time same, change the timezone in the /etc/php.ini file
root@gateway:~# vi /etc/php.ini
Uncomment the date. timezone function and set its value to the timezone you need.
To see a list of supported timezones, refer to php.net.
Step 3. After editing the file, restart the httpd service.
root@gateway:~#systemctl restart httpd
Step 4. After restarting the service, compare the GUI time with the server time.
root@gateway:~# date
Tue May 11 12:00:24 IST 2021
Access the license tab and also the server time, thus the correct time would be displayed. Also on the PHP page, the time zone has changed to the time zone we have set.
Step 5. If there still exists a time difference in the GUI and server, create a PHP page and add the following.
root@gateway:~#vi $(awk '/^www_folder/ {print $2}' /usr/local/etc/ezlogin/ez.conf)time.php
<?php
echo "The time is " . date("h:i:sa");
?>
In order to test that our system is configured properly for time, compare the server time with the time showing in the time.php page.
The following image shows an example for time.php in the browser.
Related Articles