SERVER MANAGEMENT TRAINING-Learn how to set the clock in WHMCS
One of the most common problems you may encounter after installing whmcs is the problem of not setting the clock in WHMCS .
WHMCS, This inconsistency in the server clock is due to the non-configuration of the host server on which your website is located.
In the previous session, we explained to those who are server administrators how by changing the Linux timezone, they can set the total server time, but well, not everyone who is a server admin or can not change the clock in this way.
There is also a way to set the clock in WHMCS for webmasters and those who use the whmcs system, which can be solved by having access only to the web host.
Clock setting steps in WHMCS
1- In the first method, regardless of the type of content management system and only with the following code snippet, the clock problem can be solved on the hosts.
The point of this method in web server is server hosting. If the main server uses the Apache web server to respond to requests sent to the site, the following code will be responsive on your site, otherwise you must use the second method.
First go to the root host of your website and the .htaccess file. Open. If this file does not exist on your host, create a file of the same name on your host.
Now put the following code in this file and save the settings. Be sure not to delete the contents of the file. Just add the code to the end of the file.
SetEnv TZ Asia / Tehran
2- In the second method, you can solve the clock setting problem in WHMCS through the whmcs system configuration.php file, regardless of the dependence on the web server.
Edit the config file and then look for the following code.
Now just put the following code exactly after the top line and save the changes.
date_default_timezone_set ('Asia / Tehran');
In most cases, the second method will solve the problem more definitively and with more probability.