From bfcc08cdeb73b0080593fd5cf48ade6a765888ad Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 26 Dec 2016 12:28:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3Model=E7=B1=BB=E4=B8=80?= =?UTF-8?q?=E5=A4=84=E9=94=99=E8=AF=AF?= 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 71fbfc69..7c31dc5e 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -333,7 +333,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess } elseif (is_string($this->autoWriteTimestamp) && in_array(strtolower($this->autoWriteTimestamp), ['datetime', 'date', 'timestamp'])) { $value = $this->formatDateTime($_SERVER['REQUEST_TIME'], $this->dateFormat); } else { - $value = $this->formatDateTime($value, $this->dateFormat, true); + $value = $this->formatDateTime($_SERVER['REQUEST_TIME'], $this->dateFormat, true); } return $value; }