TP-自动时间戳

如果用了自动时间戳,而你的数据库时间存贮格式是时间戳(bigint)
那么最好在模型类里面用$hidden隐藏掉create_time和update_time
或者在数据库设置datebase配置文件里设置datetime_format为false
因为默认情况下获取器会把该时间戳转换为日期形式,当你再写入时,就会出现错误数据

猜你喜欢

转载自blog.csdn.net/u012993454/article/details/81233635