修正Model类一处错误

This commit is contained in:
thinkphp
2016-12-26 12:28:03 +08:00
parent 2e51ccbc5e
commit bfcc08cdeb

View File

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