cPanel Server Time

Setting the server timezone in cPanel is very easy. Having the correct server time helps when searching through logs and for things like applications installed to operate as expected. The server timezone can be changed again once it has been set.

1. Login to WHM, which is normally accessible by adding /whm to your server hostname. For example: host.servername.co.nz/whm

2. Click on Server Configuration in the left hand menu, followed by the Server Time icon in the main window, or the Server Time link in the left hand submenu.

3. Select your preferred timezone, then click on the Change TimeZone button.

You might also like to Sync Time With Time Server to ensure the date/time displayed is updated, however this step should not be required in most cases. Some applications actually require the timezone to be specified in your PHP.ini file, which is also very easy to set through cPanel/WHM.

1. Click on Service Configuration in the left hand menu, followed by PHP Configuration Editor in the main window or in the left hand submenu.

2. Click on the Advanced Mode radio button and scroll down to Date and Time section, which will have date.timezone as the directive.

3. Find your preferred timezone in the list of supported timezones from the PHP documentation: http://php.net/manual/en/timezones.php

4. Copy your preferred timezone, for example Pacific/Auckland, and paste into the date.timezone value input box. Scroll to the bottom of the page and click on the Save button.

Congratulations, you have now successfully set both the server and PHP timezone. This change will affect all accounts on the server.

Was this answer helpful?

 Print this Article

Also Read

Search for Files or Folders with SSH

Searching for the location a file or finding certain text contained in files within a directory,...

EasyApache4 and suPHP

EasyApache 4 is a complete change to how cPanel ships and maintains Apache + PHP. cPanel does not...

How To Restart Apache

Ubuntu/Debian The recommended solution to start/stop/restart services (not just Apache) in...

CentOS Change Hostname

One of the most common changes to CentOS servers is modifying the hostname. Hostnames are...

Log Slow MySQL Queries

MySQL can often use excessive CPU cores or time out unexpectedly. The slow-query-log can assist...