From 0685a79356f4f4d07bf83657eab7f113af2c263b Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Fri, 2 May 2008 21:36:00 +0000 Subject: [PATCH] - Fixed an issue in date() where a : was printed for the O modifier after a P modifier was used. --- ext/date/php_date.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.50.1