From 64c3c73d7696e45849a568f08f6bca791d3aa24c Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 2 Sep 2016 15:10:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BModel=E7=B1=BB=E7=9A=84autoWr?= =?UTF-8?q?iteTimestamp=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/library/think/Model.php b/library/think/Model.php index 02cb6854..98eacc8a 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -321,6 +321,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess } switch ($type) { case 'datetime': + case 'date': $format = !empty($param) ? $param : $this->dateFormat; $value = date($format, $_SERVER['REQUEST_TIME']); break;