From 5ce406abd2d16c0dafeed574c20ba22d83188a4c Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 14 Jun 2016 22:30:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BModel=E7=B1=BB=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=97=B6=E9=97=B4=E6=88=B3=E5=86=99=E5=85=A5=E6=94=AF?= =?UTF-8?q?=E6=8C=81date=E5=AD=97=E6=AE=B5=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/Model.php b/library/think/Model.php index b6be17b2..8cbc745c 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -257,7 +257,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess $value = $_SERVER['REQUEST_TIME']; break; } - } elseif (isset($this->fieldType[$name]) && preg_match('/(datetime|timestamp)/is', $this->fieldType[$name])) { + } elseif (isset($this->fieldType[$name]) && preg_match('/(datetime|date|timestamp)/is', $this->fieldType[$name])) { $value = date($this->dateFormat, $_SERVER['REQUEST_TIME']); } else { $value = $_SERVER['REQUEST_TIME'];