Sometimes you may notice an incorrect time in your PHP Script or Application, then what you desire. This is because by default all our servers are configured to use the default timezone of the server which is set based on where the server is physically located. However, every user can set their desired timezone via their cPanel.
Changing PHP Timezone is very easy and requires only a few steps.
1. Login to your cPanel account and search for ‘Select PHP Version’.
2. Open “Select PHP Version’ and click on ‘Switch to PHP Options” as shown below:
Note: If you are not seeing this option, this means you have set ‘native (7.0)’ PHP version. Change it to ‘7.0’ or any PHP version you want from the dropdown and click on ‘Set as current’ after that you will see this option.
3. Set the time zone in the acceptable format as per your requirement and click on ‘Apply’ then on ‘Save’ at the bottom to save the changes you have made.
That’s it, the PHP timezone is set and saved.