PHP 5.3 now requires that we all have a specific timezone set, either by date.timezone or date_default_timezone_set();
If neither of these are set, we get a few WARNING error like the following:
To fix this, simply add the following line of code to your php.ini file: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
You can also define date_default_timezone_set setting before date.timezone function:Code:date.timezone="America/New_York"
was
nowCode:echo date('Y-m-d H:i:s', time());
Code:date_default_timezone_set('UTC'); echo date('Y-m-d H:i:s', time());


LinkBack URL
About LinkBacks
Reply With Quote