If the incorrect time is in scripts, applications, or services on your server, you may find that resetting the timezone resolves the issue. In this article, we’ll show you how to set the timezone for PHP using My cPanel. Show Note: Traditionally, the timezone is set in the php.ini configuration file, but we do not allow direct changes to php.ini on HostPapa servers, so PHP configuration changes need to be made using My cPanel. How to set the timezone for PHP1) Log in to your HostPapa dashboard. 2) Click on My cPanel or My WordPress. 3) Scroll down to the Software section and click Select PHP Version. 4) Click the Options tab. 5) Click the value next to date.timezone to edit the timezone setting. You can view a complete list of alternative timezones worldwide on the Your server's global time configuration cannot be changed, however, you can set the timezone for your website using or : Setting up timezone via hPanelOpen Hosting → Manage → PHP Configuration page. There, open the PHP options tab and edit the date.timezone value: If you are not sure which time zone to insert, check the Time Zone Map. Save the changes at the bottom of the page, and the timezone will be updated successfully 🚀 Setting up timezone via PHP functionAs an alternative to the previous option, you can set the timezone using date_default_timezone_set PHP function. Just check the List of Supported Timezones, find the one which you need, and insert the following code to your website (in most cases, to index.php):
NOTES:
|