ID: 13142 Comment by: alberto at omniacom dot it Reported By: jeannielu at hotmail dot com Status: Closed Bug Type: Date/time related Operating System: Linux PHP Version: 4.3.0-dev New Comment:
This bug is not fixed for FreeBSD. I downloaded php version 4.3.3 and snapshot php4-STABLE-200308260930 and bug is still there (along with other bugs). I already submitted the test results several times, reporting the same failed tests in versions 4.3.3RC1, RC2, RC3, RC4. Here is the relevant part of the test report for snapshot version: ===================================================================== FAILED TEST SUMMARY --------------------------------------------------------------------- Bug #25145 (SEGV on recpt of form input with name like "123[]") [tests/lang/bug25145.phpt] strtotime() function [ext/standard/tests/time/002.phpt] Check for mktime with out-of-range parameters [ext/standard/tests/time/003.phpt] Bug #13142 strtotime handling of "M d H:i:s Y" format [ext/standard/tests/time/bug13142.phpt] mktime() [ext/standard/tests/time/mktime.phpt] ===================================================================== Previous Comments: ------------------------------------------------------------------------ [2003-07-27 23:03:05] [EMAIL PROTECTED] 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. ------------------------------------------------------------------------ [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] [EMAIL PROTECTED] 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 ------------------------------------------------------------------------ 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