【发布时间】:2012-02-27 15:14:12
【问题描述】:
A PHP Error was encountered
Severity: Warning
Message: 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/Berlin' for 'CET/1.0/no DST' instead
我从我的 php 页面收到此错误。我使用 codeigniter 作为框架。这是我用来创建日期的代码:
$datestring = "%d/%m/%Y - %h:%i %a";
$time = time();
$data['curr_time'] = mdate($datestring, $time);
哪里出错了?
【问题讨论】:
-
错误是没有阅读错误信息 - 它告诉你问题是什么以及如何解决它......
标签: php codeigniter date