]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #31842 (*date('r') does not return RFC2822 conforming date string).
authorfoobar <sniper@php.net>
Fri, 4 Feb 2005 13:09:09 +0000 (13:09 +0000)
committerfoobar <sniper@php.net>
Fri, 4 Feb 2005 13:09:09 +0000 (13:09 +0000)
ext/standard/datetime.c

index 88b1b480f1cc81935e95de0f9c23bfc52d4f7c92..52fb6227bc98b13897efcd717ca11361386be851 100644 (file)
@@ -582,7 +582,7 @@ static void php_date(INTERNAL_FUNCTION_PARAMETERS, int gm)
                                break;
                        case 'r':
 #if HAVE_TM_GMTOFF
-                               sprintf(tmp_buff, "%3s, %2d %3s %04d %02d:%02d:%02d %c%02d%02d",
+                               sprintf(tmp_buff, "%3s, %02d %3s %04d %02d:%02d:%02d %c%02d%02d",
                                        day_short_names[ta->tm_wday],
                                        ta->tm_mday,
                                        mon_short_names[ta->tm_mon],
@@ -595,7 +595,7 @@ static void php_date(INTERNAL_FUNCTION_PARAMETERS, int gm)
                                        abs( (ta->tm_gmtoff % 3600) / 60 )
                                );
 #else
-                               sprintf(tmp_buff, "%3s, %2d %3s %04d %02d:%02d:%02d %c%02d%02d",
+                               sprintf(tmp_buff, "%3s, %02d %3s %04d %02d:%02d:%02d %c%02d%02d",
                                        day_short_names[ta->tm_wday],
                                        ta->tm_mday,
                                        mon_short_names[ta->tm_mon],