Today we are going to teach how to set the timezone for PHP via cPanel with a simple tutorial.
Set the timezone for PHP via cPanel
From the “Software” module, click on “Select PHP Version”.
Once inside “Select PHP Version”, click on “Options”.
In “PHP Options”, locate the variable “date.timezone” with UTC by default.
For the tutorial and as a demonstration, we will use “Europe/Madrid” as the desired time zone, but remember to enter the time zone you want to use.
Delete “UTC” from the variable “date.timezone” and write “Europe/Madrid” and click outside the writing field so that the change is saved and the confirmation message appears.