How to change cPanel date.time zone?
My php.ini
is like this:
magic_quotes_gpc = Off;
register_globals = Off;
default_charset = UTF-8;
memory_limit = 64M;
max_execution_time = 36000;
upload_max_filesize = 999M;
safe_mode = Off;
mysql.connect_timeout = 20;
session.auto_start = Off;
session.use_only_cookies = On;
session.use_cookies = On;
session.use_trans_sid = Off;
session.cookie_httponly = On;
session.gc_maxlifetime = 3600;
allow_url_fopen = on;
date.timezone = "US/Central";
display_errors = 1;
error_reporting = E_ALL;
And phpinfo()
shows like this:
5
Answers
if u want to use another timezone in
php
script you can use@RAHEEZ PC, you have to restart your apache service after making change in php.ini file. Restarting the server or apache service is must to have your changes in effect.
Or
You can set runtime timezone, like this:
Write above mentioned line in your index.php file or some master file, because it includes all other files of your project.
I have
America/Los_Angeles
because it will set USA central time.Using htaccess file we can able to change timezone
Adjust default time zone
SetEnv TZ America/Washington
if you have root access, to set the correct time zone, use the following procedure:
If the time is still shown incorrectly, you can synchronize the server time with a time server by clicking on “Sync Time with Time Server”.
config/config.php
beforebase_url
you should write