From: Derick Rethans Date: Mon, 3 Sep 2007 12:03:46 +0000 (+0000) Subject: - Fixed DateTimeZone::getTransitions(). X-Git-Tag: RELEASE_2_0_0a1~1890 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cf0e8798700a0aa80c3ffbc47329515ef17d23e6;p=php - Fixed DateTimeZone::getTransitions(). --- diff --git a/ext/date/php_date.c b/ext/date/php_date.c index b36091ca07..53a7f56072 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2315,7 +2315,11 @@ PHP_FUNCTION(timezone_transitions_get) MAKE_STD_ZVAL(element); array_init(element); add_ascii_assoc_long(element, "ts", tzobj->tz->trans[i]); - add_ascii_assoc_string(element, "time", php_format_date(DATE_FORMAT_ISO8601, 13, tzobj->tz->trans[i], 0 TSRMLS_CC), 0); + if (UG(unicode)) { + add_assoc_unicode(element, "time", (UChar*) php_format_date(DATE_FORMAT_ISO8601, 13, tzobj->tz->trans[i], 0 TSRMLS_CC), 0); + } else { + add_assoc_string(element, "time", php_format_date(DATE_FORMAT_ISO8601, 13, tzobj->tz->trans[i], 0 TSRMLS_CC), 0); + } add_ascii_assoc_long(element, "offset", tzobj->tz->type[tzobj->tz->trans_idx[i]].offset); add_ascii_assoc_bool(element, "isdst", tzobj->tz->type[tzobj->tz->trans_idx[i]].isdst); add_ascii_assoc_ascii_string(element, "abbr", &tzobj->tz->timezone_abbr[tzobj->tz->type[tzobj->tz->trans_idx[i]].abbr_idx], 1);