ID:               49394
 Updated by:       srina...@php.net
 Reported By:      hjones at hopone dot net
 Status:           Closed
 Bug Type:         Strings related
 Operating System: Solaris 9 (Sparc V9; 64-bit)
 PHP Version:      5.2.10
 New Comment:

the fix for this bug was delivered as part of fix for bug:48276 (
http://bugs.php.net/bug.php?id=48276). if you wish, you can use
5.2.11RC1 candidate build available from 
http://downloads.php.net/ilia/php-5.2.11RC1.tar.bz2

pl. note that these RC1 builds are meant for testing and not
production.


Previous Comments:
------------------------------------------------------------------------

[2009-08-27 21:27:10] der...@php.net

This bug has been fixed in SVN.

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/.
 
Thank you for the report, and for helping us make PHP better.

This is already fixed in SVN, please try a snapshot.

------------------------------------------------------------------------

[2009-08-27 20:49:24] hjones at hopone dot net

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

------------------------------------------------------------------------

[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

Reply via email to