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.
Follow these simple steps to change PHP Timezone:
- Login to your cPanel account and search for Select PHP Version.
- Open Select PHP Version and click on ‘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 drop-down and click on ‘Set as current‘ after that you will see this option.
- You will see here date.timezone.
- 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.