MFH: Fixed bug #31056 (php_std_date() returns invalid formatted date if
authorIlia Alshanetsky <iliaa@php.net>
Thu, 16 Dec 2004 00:10:55 +0000 (00:10 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 16 Dec 2004 00:10:55 +0000 (00:10 +0000)
y2k_compliance is On).

NEWS
ext/standard/datetime.c

diff --git a/NEWS b/NEWS
index 6e77c5ce53baf4ac06de5856dfe0285a75e693f3..2a47c3a15cc411d0599f3653d058e9cede794b88 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,8 @@
 PHP 4                                                                      NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? ????, Version 4.3.11
+- Fixed bug #31056 (php_std_date() returns invalid formatted date if 
+  y2k_compliance is On). (Ilia)
 
 15 Dec 2004, Version 4.3.10
 - Added the %F modifier to *printf to render a non-locale-aware representation
index 4de3d5f95f2d5d2068d501add90a8c202ab75d57..f7c8d8210dfc5a5cee5f98e1079de319c84576c7 100644 (file)
@@ -773,7 +773,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],