summaryrefslogtreecommitdiff
path: root/ext/standard/datetime.c
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2005-02-04 13:08:56 +0000
committerfoobar <sniper@php.net>2005-02-04 13:08:56 +0000
commitb61a63d00875ffa9c59994c928a0606de1627714 (patch)
tree9e83fa1a152b8926016aeeda203119b3cf5d32c1 /ext/standard/datetime.c
parent951eb23e9a7b2ed26a72799ffba58aed62d4e949 (diff)
downloadphp-git-b61a63d00875ffa9c59994c928a0606de1627714.tar.gz
- Fixed bug #31842 (*date('r') does not return RFC2822 conforming date string).
Diffstat (limited to 'ext/standard/datetime.c')
-rw-r--r--ext/standard/datetime.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c
index b327c346c2..2a6050e5fd 100644
--- a/ext/standard/datetime.c
+++ b/ext/standard/datetime.c
@@ -586,7 +586,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],
@@ -599,7 +599,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],