Closed GoogleCodeExporter closed 8 years ago
Original comment by dualf...@gmail.com
on 18 Jun 2008 at 5:50
这里进行了调整,将原本由表数据入口负责的自动时间填充��
�为由 ActiveRecord 负责。
现在可以在 ActiveRecord 继承类的 create_autofill 和 update_autofill
中指定是否使用当
前时间填充属性。
例如:
{{{
'create_autofill' => array
(
'created' => self::AUTOFILL_TIMESTAMP,
'updated' => self::AUTOFILL_TIMESTAMP,
),
}}}
AUTOFILL_TIMESTAMP 是当前时间的 UNIX TIMESTAMP 形式,AUTOFILL_DATETIME
是当前时间的
ISO 8601 格式(例如:2004-02-12T15:19:21+00:00)。
Original comment by dualf...@gmail.com
on 18 Jun 2008 at 7:00
这次调整后又影响到非created型日期时间字段啦。
例如字段us_lastlogin 日期时间型 缺省可以为null。
当我不设置该字段时,保存时出错。出错信息如下:
us_lastlogin:最后登陆时间必须是一个有效的日期时间字符串。
qeephp svn : 1170.
出错代码如下请参考:
$u2 = new user();
$u2->us_uname = "abcttt";
$u2->us_email = "u1@gmail.com";
$u2->us_nickname = "asssbc111";
$u2->us_regip = 1234;
$u2->save();
Original comment by gaohem...@gmail.com
on 19 Jun 2008 at 12:02
Original issue reported on code.google.com by
gaohem...@gmail.com
on 18 Jun 2008 at 11:35