Skip to content

Commit 6a5798d

Browse files
committed
Use new structures for tzdb header here as well
1 parent df49ce3 commit 6a5798d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ext/date/php_date.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3898,7 +3898,7 @@ PHP_FUNCTION(timezone_transitions_get)
38983898
add_assoc_string(element, "abbr", &tzobj->tzi.tz->timezone_abbr[tzobj->tzi.tz->type[tzobj->tzi.tz->trans_idx[i]].abbr_idx], 1); \
38993899
add_next_index_zval(return_value, element);
39003900

3901-
#define add_last() add(tzobj->tzi.tz->timecnt - 1, timestamp_begin)
3901+
#define add_last() add(tzobj->tzi.tz->bit32.timecnt - 1, timestamp_begin)
39023902

39033903
array_init(return_value);
39043904

@@ -3909,7 +3909,7 @@ PHP_FUNCTION(timezone_transitions_get)
39093909
} else {
39103910
begin = 0;
39113911
found = 0;
3912-
if (tzobj->tzi.tz->timecnt > 0) {
3912+
if (tzobj->tzi.tz->bit32.timecnt > 0) {
39133913
do {
39143914
if (tzobj->tzi.tz->trans[begin] > timestamp_begin) {
39153915
if (begin > 0) {
@@ -3921,18 +3921,18 @@ PHP_FUNCTION(timezone_transitions_get)
39213921
break;
39223922
}
39233923
begin++;
3924-
} while (begin < tzobj->tzi.tz->timecnt);
3924+
} while (begin < tzobj->tzi.tz->bit32.timecnt);
39253925
}
39263926
}
39273927

39283928
if (!found) {
3929-
if (tzobj->tzi.tz->timecnt > 0) {
3929+
if (tzobj->tzi.tz->bit32.timecnt > 0) {
39303930
add_last();
39313931
} else {
39323932
add_nominal();
39333933
}
39343934
} else {
3935-
for (i = begin; i < tzobj->tzi.tz->timecnt; ++i) {
3935+
for (i = begin; i < tzobj->tzi.tz->bit32.timecnt; ++i) {
39363936
if (tzobj->tzi.tz->trans[i] < timestamp_end) {
39373937
add(i, tzobj->tzi.tz->trans[i]);
39383938
}

0 commit comments

Comments
 (0)