改进Builder类的parseDateTime方法

This commit is contained in:
thinkphp
2016-12-09 18:12:27 +08:00
parent 846553ec13
commit 936e4b3b04

View File

@@ -437,7 +437,7 @@ abstract class Builder
$info = $type[$key];
}
if (isset($info)) {
if (is_numeric($value) && strtotime($value)) {
if (is_string($value)) {
$value = strtotime($value) ?: $value;
}