PHP 4.0 Bug #3028: setcookie outputs wrong format, year not 4-digits
| From: | wew at bearnet dot com | Date: | Wed, 22 Dec 1999 20:07:19 +0000 |
| Subject: | PHP 4.0 Bug #3028: setcookie outputs wrong format, year not 4-digits | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-13947@lists.php.net to get a copy of this message | ||
From: wew@bearnet.com
Operating system: Linux 2.0.34
PHP version: 4.0 Beta 3
PHP Bug Type: Misbehaving function
Bug description: setcookie outputs wrong format, year not 4-digits
According to http://www.netscape.com/newsref/std/cookie_spec.html:
The date string is formatted as:
Wdy, DD-Mon-YYYY HH:MM:SS GMT
Output of PHP4's setcookie('browser_id', $b_id, time() + (2 * YEAR), '/',
COOKIE_DOMAIN) is:
Set-Cookie: browser_id=26; expires=Friday, 21-Dec-01 19:47:53 GMT; path=/; domain=.bearnet.com
The expires part should be:
Fri, 21-Dec-2001 19:47:53 GMT
The two-digit year is the most glaring problem, but to be absolutely correct the day-of-week should
also be fixed (three letters).
This problem may also exist in PHP3, I haven't checked.
--Bill