开发者

php codeigniter - strtotime error

Getting strtotime error in php-codeigniter and the problem arises only in windows 7 not in windows xp. Error : [2048] strtotime() [function.strtotime]: It is not safe to rely on the system's timezone set开发者_StackOverflow社区tings. Please use the date.timezone setting, the TZ environment variable 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 'UTC' for '5.5/no DST' instead

Any help.


In your php.ini file, put this (or your own timezone):

date.timezone = "US/Central"


It's safe to ignore this error if the time isn't critical. Change error_reporting from E_STRICT to hide the error.


Without overriding php.ini file you can put the following code in your page

$default_timezone = date_default_timezone_get(); date_default_timezone_set($default_timezone);


Just use this:

date_default_timezone_set('UTC');

UTC stands for universal time zone, or you can set according to the country you want to set.

Check this page.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜