Just the other day as I was scanning through one of my blogs, I found it full of error codes. They were all over the place – on the homepage, post pages and even in the wp-admin section. The error mainly showed the following two warnings: ‘Warning: date() [function.date]:’ and ‘Warning: strtotime() [function.strtotime]:’. Ugly! Well but the solution is pretty much easy.
The whole error was something like this:
Warning: strtotime() [function.strtotime]: 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 ‘Europe/Helsinki’ for ‘EEST/3.0/DST’ instead in /path/to/my/www/wp-includes/functions.php on line 35
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 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 ‘Europe/Helsinki’ for ‘EEST/3.0/DST’ instead in /path/to/my/www/wp-includes/functions.php on line 43
Basically the error tells you that your wordpress’s system time is not set, and it has assumed a system time which may not be accurate. And also that you need to rectify it immediately.
Solution:
There are two simple ways to solve this problem. However both requires that you edit essential system files of your blog.
-
Edit the wp-config.php (recommended)
Well this is the recommended as well as the easier of the two options. Just fire up your FTP software or access your web host’s file manager. Go to the directory where you have installed wordpress and search for a file called wp-config.php.
Just open it and add the following line, just below the line
define('DB_COLLATE', '');(refer image):date_default_timezone_set('America/Chicago');This should be the final product:

That’s it. Now just save your the wp-config.php and your done. The error will disappear away.
-
Edit the php.ini
Similar to the first option use your FTP software or web host’s file manager and navigate to your php.ini file. Now edit it and insert the following code in it:
date.timezone = "America/Anchorage"That’s it. Now save your file up and go see your blog.
Note: You can change the America/Anchorage parameter with your preferred timezone. For other parameters refer this page.
Still have problems? Comment on.





WoW,
It worked.
Thanks
[...] is from Sunday to Saturday, which is different from the ISO standard of Monday to Sunday. …How to Solve the 'Warning: date() [function.date]:' Error in …The error mainly showed the following two warnings: Warning: date() [function.date]:' and Warning: [...]
thanks it work properly… thanks again