时间格式转换问题

浏览:1850 发布日期:2017/03/30
5.0.0 - 严重 - 未处理
protected function formatDateTime($time, $format, $timestamp = false)
{
if (false !== strpos($format, '\\')) {
$time = new $format($time);
} elseif (!$timestamp && false !== $format) {
$time = date($format, $time);
}
return $time;
}

上段代码是处理时间戳的 如果 数据库中的 时间字段是 datetime 格式 则 Model 中的 toArray() 函数不能使用 导致 Response中的方法不能够使用
评论(
后面还有条评论,点击查看>>