On this article we are going to describe how one can set PHP timezone setting in .htaccess utilizing cPanel or Plesk management additionally you are able to do it by way of SSH.
Utilizing the date.timezone directive
By default, UnivaHost servers are set to make use of the ASIA and USA Time zone. You possibly can change the time zone that PHP makes use of to your scripts by setting the date.timezone directive in an .htaccess file.
For an entire checklist of supported time zones in PHP, please go to
Find out how to set the time zone, observe these steps:
1. Login your account utilizing cPanel, Plesk, or SSH
2. Use a textual content/code editor or when you use any Internet hosting management panel you need to use cPanel or Plesk default editor so as to add the next line to the .htaccess file. Change Area/Zone with your individual time zone:
php_value date.timezone ‘Area/Zone’
3. Save the modifications to the .htaccess file and exit your code/textual content editor.
4. To confirm that the brand new setting is lively, create a PHP take a look at file that comprises the next code in the identical listing the place the .htaccess file is situated:
<?php phpinfo(); ?>
5. Load the take a look at file in your internet browser, after which seek for the title of the directive. The Native Worth column ought to show the brand new setting that you simply specified within the .htaccess file.