#36309 [Opn->Bgs]: strtotime() returns -1, NOT false as the docs say it should.
| From: | derick@php.net | Date: | Tue, 07 Feb 2006 07:24:41 +0000 |
| Subject: | #36309 [Opn->Bgs]: strtotime() returns -1, NOT false as the docs say it should. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-92997@lists.php.net to get a copy of this message | ||
ID: 36309
Updated by: derick@php.net
Reported By: ipso at snappymail dot ca
-Status: Open
+Status: Bogus
Bug Type: Date/time related
Operating System: Linux
PHP Version: 5.1.2
New Comment:
No bug here. The time that you specify (1969-12-31 15:59:59-08) is
exactly one second before the epoch starts (1970-01-01 00:00 GMT) and
thus the function correctly returns -1.
Previous Comments:
------------------------------------------------------------------------
[2006-02-07 00:54:17] ipso at snappymail dot ca
Description:
------------
strtotime() returns -1 when it should return FALSE as per the docs for
PHP v5.1.2
Reproduce code:
---------------
strtotime('1969-12-31 15:59:59-08');
returns: -1
Expected result:
----------------
expected return of: FALSE with PHP v5.1.2
Actual result:
--------------
result: -1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36309&edit=1