数据库数据读取改为默认 保持数据库字段大小写 Connection类fieldCase方法改为public

This commit is contained in:
thinkphp
2016-06-23 12:07:25 +08:00
parent 34579bfa44
commit 5b061cd998
2 changed files with 10 additions and 10 deletions

View File

@@ -257,11 +257,11 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
list($type, $param) = explode(':', $type, 2);
}
switch ($type) {
case 'timestamp':
case 'datetime':
$format = !empty($param) ? $param : $this->dateFormat;
$value = date($format, $_SERVER['REQUEST_TIME']);
break;
case 'datetime':
case 'timestamp':
$value = $_SERVER['REQUEST_TIME'];
break;
}