Hello, I have a problem that I can't solve. My scripts keep sending this error: date() [<a href='function.date'>function.date</a>]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_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 'America/New_York' for 'EST/-5.0/no DST' instead Now, I know about php.ini and changing the localzone to America/New_York. I also know about setting the timezone at the beginning of the PHP file, but I can't do this since one of the files is protected and I cannot change it. I modified the php.ini, but it's not working. I restarted the server, and again no luck. can someone help me solve this? Thanks.
Just put this at the top of your php file: date_default_timezone_set('America/New_York'); Code (markup):
Sorry, I missed the part where you said you already knew about this. Are you including the protected file in another php file before it's being called? If so, you could use the above statement before it is included.
Script or scripts? If its just one script, you could always place the following into a .htaccess file date.timezone = "America/New_York" Code (markup):