Bug #15952 Updated: date and gmdate don't return correct RFC 822 string
| From: | sander@php.net | Date: | Fri, 08 Mar 2002 17:25:49 +0000 |
| Subject: | Bug #15952 Updated: date and gmdate don't return correct RFC 822 string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-2043@lists.php.net to get a copy of this message | ||
ID: 15952
Updated by: sander@php.net
-Summary: date and gmdate don't return correct RFC 822 string
Reported By: soenke@kino-fahrplan.de
-Status: Open
+Status: Closed
Bug Type: Date/time related
Operating System: Linux/LFS 2.4.17
PHP Version: 4.0.6
New Comment:
This bug has been fixed in CVS.
Previous Comments:
------------------------------------------------------------------------
[2002-03-08 05:54:40] soenke@kino-fahrplan.de
RFC 822 specifies the date string in chapter 5.1 as
date = 1*2DIGIT month 2DIGIT
2DIGIT is defined to be "exactly <n> occurrences of (element). Thus
2DIGIT is a 2-digit number" [chapter 2.6].
PHP however returns the day value as one digit only, e.g.:
Fri, 8 Mar 2002 10:33:37 +0000
This might seem to be a minor issue but actually makes date("r") or
gmdate("r") unusable with software that expects two digit days. The
Apache server is probably the most important one: creating a
conditional request like
"If-Modified-Since: " . gmdate("r",$lastmtime)
will for example not work. It will not fail, but Apache won't recognize
this date and always return the file, modified or not.
(And yes, Apache's behaviour should be modified, too, making it less
picky)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=15952&edit=1