ID: 49394 Comment by: hjones at hopone dot net Reported By: hjones at hopone dot net Status: Open Bug Type: Strings related Operating System: Solaris 9 (Sparc V9; 64-bit) PHP Version: 5.2.10 New Comment:
PHP was compiled with the following GCC: # gcc -v Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3.2/specs Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disable-nls Thread model: posix gcc version 3.3.2 Previous Comments: ------------------------------------------------------------------------ [2009-08-27 20:43:17] hjones at hopone dot net Description: ------------ Upgrading from 5.2.9 to 5.2.10 causes setcookie() to return the year '0000' instead of '2009' when used with time() as the cookie expiry. Replacing 5.2.10's ext/date/php_date.{c,h} with 5.2.9's copy and recompiling corrects this issue. I believe this is a regression caused by PHP bug #48058 Reproduce code: --------------- <?php setcookie("php_test_cookie", "test_cookie_value", time() + 1444000); ?> Expected result: ---------------- Set-Cookie: php_test_cookie=test_cookie_value; expires=Sun, 13-Sep-2009 11:31:54 GMT Actual result: -------------- Set-Cookie: php_test_cookie=test_cookie_value; expires=Sun, 13-Sep-0000 11:31:54 GMT ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49394&edit=1