3.2.2 - 普通 - 未处理
类 \Org\Util\Date;方法 parse
if (is_string($date)) {
if (($date == "") || strtotime($date) == -1) {
//为空默认取得当前时间戳
$tmpdate = time();
} else {
//把字符串转换成UNIX时间戳
$tmpdate = strtotime($date);
}
} elseif (is_null($date)) {
//为空默认取得当前时间戳
$tmpdate = time();
} elseif (is_numeric($date)){
.......is_numeric($date)检测是否应该放在is_string($date)检测的前面,很多时候从数据库取出来的时间戳都是没有转成int格式的。 