试图解析1942年5月5日日期时间PHP的致命错误具有负时间戳
-872726549
DatTime::__construct()
Failed to parse time string (-872726549) at position 7 (4):
Unexpected character
同样对于前1 1 1970
1969年12月31日有相同的错误所有daties
我在Windows上使用XAMPP,PHP 5.4
这三ggers错误:
$topv=-872726549;
$compared_time=new DateTime($topv);
你知道,时间戳在0和结束开始在2最大的32次幂?时间戳总是正整数。# – ITroubs 2013-03-20 20:18:09
我遇到了'$ date = $ year .'-'。$ month' - '。$ day'的负值。 ” .date( “H:I:S”); $ datev = strtotime(date($ date),time());' – lbennet 2013-03-20 20:19:24
您是否阅读过DateTime的文档? 'public DateTime :: __ construct()([string $ time =“now”[,DateTimeZone $ timezone = NULL]])'它也明确指出:'time:'日期/时间字符串。有效的格式在日期和时间格式中解释。'' – ITroubs 2013-03-20 20:25:32