From: Derick Rethans Date: Tue, 28 Apr 2015 23:28:50 +0000 (+0100) Subject: Use new structures for tzdb header here as well X-Git-Tag: php-5.5.25RC1~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6a5798d990e1d1ad62a627d5cebd455214ca5c37;p=php Use new structures for tzdb header here as well --- diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 7f05bab99e..12d9ea779f 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -3898,7 +3898,7 @@ PHP_FUNCTION(timezone_transitions_get) add_assoc_string(element, "abbr", &tzobj->tzi.tz->timezone_abbr[tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i]].abbr_idx], 1); \ add_next_index_zval(return_value, element); -#define add_last() add(tzobj->tzi.tz->timecnt - 1, timestamp_begin) +#define add_last() add(tzobj->tzi.tz->bit32.timecnt - 1, timestamp_begin) array_init(return_value); @@ -3909,7 +3909,7 @@ PHP_FUNCTION(timezone_transitions_get) } else { begin = 0; found = 0; - if (tzobj->tzi.tz->timecnt > 0) { + if (tzobj->tzi.tz->bit32.timecnt > 0) { do { if (tzobj->tzi.tz->trans[begin] > timestamp_begin) { if (begin > 0) { @@ -3921,18 +3921,18 @@ PHP_FUNCTION(timezone_transitions_get) break; } begin++; - } while (begin < tzobj->tzi.tz->timecnt); + } while (begin < tzobj->tzi.tz->bit32.timecnt); } } if (!found) { - if (tzobj->tzi.tz->timecnt > 0) { + if (tzobj->tzi.tz->bit32.timecnt > 0) { add_last(); } else { add_nominal(); } } else { - for (i = begin; i < tzobj->tzi.tz->timecnt; ++i) { + for (i = begin; i < tzobj->tzi.tz->bit32.timecnt; ++i) { if (tzobj->tzi.tz->trans[i] < timestamp_end) { add(i, tzobj->tzi.tz->trans[i]); }