Tristan,
Thanks for that information. Shouldn't the default cPanel php.ini already have a date/timezone set ???
As to the original issue. I created a test.php file in one of my customers directories.
This is all it as in it.
Code:
<?php
echo date('l jS \of F Y h:i:s A');
?>
When you call it from a browser, the correct date/time is displayed, but in the users error_log file, it shows this:
[11-Jun-2012 14:35:42 UTC] PHP Warning: 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/Chicago' for 'CDT/-5.0/DST' instead in /home/XXXXXXXX/public_html/test.php on line 3
Then I went back and edited the test.php file:
Code:
<?php
date_default_timezone_set('America/Chicago');
echo date('l jS \of F Y h:i:s A');
?>
Saved the file and called the test.php script again. The date/timezone still
displays correctly and now, no more error message in the error_log file.