From: Derick Rethans Date: Fri, 2 May 2008 21:36:00 +0000 (+0000) Subject: - Fixed an issue in date() where a : was printed for the O modifier after a P X-Git-Tag: RELEASE_1_2_5~38 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0685a79356f4f4d07bf83657eab7f113af2c263b;p=php - Fixed an issue in date() where a : was printed for the O modifier after a P modifier was used. --- diff --git a/ext/date/php_date.c b/ext/date/php_date.c index a319831859..1fd8d07c16 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -731,7 +731,7 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca char buffer[33]; timelib_time_offset *offset = NULL; timelib_sll isoweek, isoyear; - int rfc_colon = 0; + int rfc_colon; if (!format_len) { return estrdup(""); @@ -761,6 +761,7 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca timelib_isoweek_from_date(t->y, t->m, t->d, &isoweek, &isoyear); for (i = 0; i < format_len; i++) { + rfc_colon = 0; switch (format[i]) { /* day */ case 'd': length = slprintf(buffer, 32, "%02d", (int) t->d); break;