Warning:
date()[function.date]: It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or thedate_default_timezone_set()function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier.
We selected Asia/Calcutta for 5.5/no DST instead in E:\xampp\htdocs\suraj\central_db_system\dwnld_reg_data.php on line 8
And I resolved this warning by calling function
date_default_timezone_set('America/Los_Angeles');
But each time I have to add this function on each page.
Is there any other way to resolve this problem?
create a php file with the following code and you should be able to see what the property is currently set to:
php.ini is usually a massive text file so you’d have to just open it with a simple text editor and search for the setting.
On my testing server the timezone setting looks like this:
You’d just have to change ‘UTC’ to whatever timezone you need. Note: if your on a shared server with a hosting company you will probably not be able to edit the PHP ini yourself and the hosting company may refuse to do this but if ifs your own server you can change what you like.
Be careful with php.ini, if you delete the wrong line it may stop php from working altogether. backup php.ini first is always wise.