ID:               15952
 Updated by:       [EMAIL PROTECTED]
-Summary:          date and gmdate don't return correct RFC 822 string
 Reported By:      [EMAIL PROTECTED]
-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] [EMAIL PROTECTED]

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

Reply via email to