From: Ilia Alshanetsky Date: Thu, 16 Dec 2004 00:12:56 +0000 (+0000) Subject: MFH: Fixed bug #31056 (php_std_date() returns invalid formatted date if X-Git-Tag: php-5.0.4RC1~472 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3bb2ce51c5f088428b737b8c0ae14242b179e34a;p=php MFH: Fixed bug #31056 (php_std_date() returns invalid formatted date if y2k_compliance is On). --- diff --git a/NEWS b/NEWS index 4b35d8aba4..b4b89972ac 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2005, PHP 5.0.4 +- Fixed bug #31056 (php_std_date() returns invalid formatted date if + y2k_compliance is On). (Ilia) 15 Dec 2004, PHP 5.0.3 - Added the %F modifier to *printf to render a non-locale-aware representation diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c index 694668198d..88b1b480f1 100644 --- a/ext/standard/datetime.c +++ b/ext/standard/datetime.c @@ -945,7 +945,7 @@ char *php_std_date(time_t t TSRMLS_DC) tm1 = php_gmtime_r(&t, &tmbuf); str = emalloc(81); if (PG(y2k_compliance)) { - snprintf(str, 80, "%s, %02d-%s-%04d %02d:%02d:%02d GMT", + snprintf(str, 80, "%s, %02d %s %04d %02d:%02d:%02d GMT", day_short_names[tm1->tm_wday], tm1->tm_mday, mon_short_names[tm1->tm_mon],