From:             hjones at hopone dot net
Operating system: Solaris 9 (Sparc V9; 64-bit)
PHP version:      5.2.10
PHP Bug Type:     Strings related
Bug description:  Probable date_format regression due to #48058

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 bug report at http://bugs.php.net/?id=49394&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=49394&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=49394&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=49394&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=49394&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49394&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=49394&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=49394&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=49394&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=49394&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=49394&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=49394&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=49394&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=49394&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=49394&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=49394&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=49394&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=49394&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=49394&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=49394&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=49394&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=49394&r=mysqlcfg

Reply via email to