summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2007-09-03 12:03:46 +0000
committerDerick Rethans <derick@php.net>2007-09-03 12:03:46 +0000
commitcf0e8798700a0aa80c3ffbc47329515ef17d23e6 (patch)
tree4dcd2ba474f7980b6c8951a3e5aee406664b369b
parentea2d7049535f702502199e2fe8ec9a34588dac17 (diff)
downloadphp-git-cf0e8798700a0aa80c3ffbc47329515ef17d23e6.tar.gz
- Fixed DateTimeZone::getTransitions().
-rw-r--r--ext/date/php_date.c6
1 files changed, 5 insertions, 1 deletions
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);