sueijing 发表于 2009-10-22 16:20:52

关于数据库时间.config.php里面如何设置?

急.........

sueijing 发表于 2009-10-22 16:30:00

我的数据库时间差了八个小时.不能个改PHP.ini   CI中哪个地方有设置么?

Hex 发表于 2009-10-22 16:34:44

php5 有设置时区的函数。

happydances 发表于 2010-5-13 12:39:00

在ci的config文件中已经有设置了

/*
|--------------------------------------------------------------------------
| Master Time Reference
|--------------------------------------------------------------------------
|
| Options are "local" or "gmt".This pref tells the system whether to use
| your server's local time as the master "now" reference, or convert it to
| GMT.See the "date helper" page of the user guide for information
| regarding date handling.
|
*/
$config['time_reference'] = 'local';
不过这个我感觉也没有起到做用
你可以在下面再加一段代码
date_default_timezone_set('Asia/Shanghai');
这个可以保证是这个时区 后面的参数可以设置
页: [1]
查看完整版本: 关于数据库时间.config.php里面如何设置?