summaryrefslogtreecommitdiff
path: root/ext/date
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2008-05-02 21:36:00 +0000
committerDerick Rethans <derick@php.net>2008-05-02 21:36:00 +0000
commit0685a79356f4f4d07bf83657eab7f113af2c263b (patch)
treedb36f03aee379f28e5210af254546e8010f3aa7b /ext/date
parent6bec04b0a3b8f20190d7661dc54f34302b6d8540 (diff)
downloadphp-git-0685a79356f4f4d07bf83657eab7f113af2c263b.tar.gz
- Fixed an issue in date() where a : was printed for the O modifier after a P
modifier was used.
Diffstat (limited to 'ext/date')
-rw-r--r--ext/date/php_date.c3
1 files changed, 2 insertions, 1 deletions
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;