#31583 [Opn->Ver]: [PATCH] php_std_date() uses short day names in non-y2k_compliance mode
| From: | sniper@php.net | Date: | Mon, 21 Feb 2005 19:44:34 +0000 |
| Subject: | #31583 [Opn->Ver]: [PATCH] php_std_date() uses short day names in non-y2k_compliance mode | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-74370@lists.php.net to get a copy of this message | ||
ID: 31583
Updated by: sniper@php.net
-Summary: php_std_date() uses short day names in
non-y2k_compliance mode
Reported By: mike@php.net
-Status: Open
+Status: Verified
Bug Type: Date/time related
-Operating System: N/A
+Operating System: *
-PHP Version: Irrelevant
+PHP Version: 4CVS, 5CVS (2005-02-21)
New Comment:
NEVER use that 'Irrelevant' or anything but 4 or 5 as first char in the
Version field!!!
Previous Comments:
------------------------------------------------------------------------
[2005-01-31 14:09:41] mike@php.net
The following patches should fix this issue additionally to bug
#31689:
http://dev.iworks.at/patches/PHP_4_3_datetime_PHPAPI.patch.txt
http://dev.iworks.at/patches/PHP_5_0_datetime_PHPAPI.patch.txt
http://dev.iworks.at/patches/PHP_HEAD_datetime_PHPAPI.patch.txt
------------------------------------------------------------------------
[2005-01-17 13:25:12] mike@php.net
Here's the patch against HEAD:
--- php-src/ext/standard/datetime.c 12 Dec 2004 15:50:06 -0000
1.125
+++ php-src/ext/standard/datetime.c 17 Jan 2005 12:14:02 -0000
@@ -957,7 +957,7 @@
tm1->tm_hour, tm1->tm_min,
tm1->tm_sec);
} else {
snprintf(str, 80, "%s, %02d-%s-%02d %02d:%02d:%02d
GMT",
- day_short_names[tm1->tm_wday],
+ day_full_names[tm1->tm_wday],
tm1->tm_mday,
mon_short_names[tm1->tm_mon],
((tm1->tm_year) % 100),
... and PHP4:
--- php4/ext/standard/datetime.c 16 Dec 2004 00:10:55 -0000
1.96.2.17
+++ php4/ext/standard/datetime.c 17 Jan 2005 12:24:30 -0000
@@ -781,7 +781,7 @@
tm1->tm_hour, tm1->tm_min,
tm1->tm_sec);
} else {
snprintf(str, 80, "%s, %02d-%s-%02d %02d:%02d:%02d
GMT",
- day_short_names[tm1->tm_wday],
+ day_full_names[tm1->tm_wday],
tm1->tm_mday,
mon_short_names[tm1->tm_mon],
((tm1->tm_year) % 100),
------------------------------------------------------------------------
[2005-01-17 12:43:55] mike@php.net
Description:
------------
http://cvs.php.net/co.php/php-src/ext/standard/datetime.c#999
should use day_long_names[] to be RFC850 compliant
Expected result:
----------------
Sunday, 06-Nov-94 08:49:37 GMT
Actual result:
--------------
Sun, 06-Nov-94 08:49:37 GMT
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31583&edit=1