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; }