核心包中util类中时间处理问题strtotime返回值-1

浏览:472 发布日期:2015/06/15 分类:技术分享 关键字: strtotime返回-1
在library-util-Date.class.php中。下面有个值为-1,我说咋为-1呢,查了收藏人家说: previous to PHP 5.1.0 you would compare with -1, instead of false

看来这个是多久没更新了。

public function parse($date) {
if (is_string($date)) {
if (($date == "") || strtotime($date) == -1) {
// previous to PHP 5.1.0 you would compare with -1, instead of false
//为空默认取得当前时间戳
$tmpdate = time();
} else {
最佳答案
评论() 相关
后面还有条评论,点击查看>>