ID: 13142
Updated by: iliaa@php.net
Reported By: jeannielu at hotmail dot com
-Status: Verified
+Status: Closed
Bug Type: Date/time related
Operating System: Linux
PHP Version: 4.3.0-dev
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2003-04-19 16:49:43] fh at fuenf-freun dot de
The problem is that the argument is ambigous.
"M d H:i:s Y"
could also be interpreted as
"M d Y:i:s Y".
The latter case happens when PHP parses the string. Then a parse error
occurs, because ':i:s' doesn't make any sense. Therefore, the function
returns -1.
In ext/standard/parsedate.y, the expression "M d H:i:s Y" is matched by
'tUNUMBER tMONTH tUNUMBER' (M d H) as well as 'tUNUMBER : tUNUMBER :
tUNUMBER' (H:i:s).
Unfortunately, I am not able to submit a patch as I know nothing about
lex/yacc.
Frederik
------------------------------------------------------------------------
[2003-04-07 14:40:20] jparneodo at yahoo dot fr
Same problem on RedHat 7.2
with PHP 4.3.0
on CEST timezone
returns -1
------------------------------------------------------------------------
[2003-01-02 19:34:21] nicos@php.net
Verified again with 4.3.0.
------------------------------------------------------------------------
[2002-10-11 09:13:55] godin dot gilles at ic dot gc dot ca
I am using PHP 4.2.3 under Windows 2000 where
date("D M d H:i:s T Y") produces...
Fri Oct 11 09:52:47 Eastern Standard Time 2002
instead of...
Fri Oct 11 09:52:47 EDT 2002
and, strtotime() of either format produced above returns -1
------------------------------------------------------------------------
[2002-07-04 13:22:32] eru@php.net
Verified during the Bughunt
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/13142--
Edit this bug report at http://bugs.php.net/?id=13142&edit=1