Bug #15952 Updated: date and gmdate don't return correct RFC 822 string

From: Date: Sat, 09 Mar 2002 11:27:38 +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-2092@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: Closed +Status: Bogus Bug Type: Date/time related Operating System: Linux/LFS 2.4.17 PHP Version: 4.0.6 New Comment: 1*2DIGIT means 1 or 2 digits, so the old behaviour was correct. I've reverted my patch; the behaviour hasn't changed. Previous Comments: ------------------------------------------------------------------------ [2002-03-08 12:25:48] sander@php.net This bug has been fixed in CVS. ------------------------------------------------------------------------ [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

« previous php.bugs (#2092) next »