Skip to content

Commit 83b714d

Browse files
committed
Merge branch 'PHP-8.1' into PHP-8.2
2 parents e29ca36 + 64f5f53 commit 83b714d

10 files changed

+186
-110
lines changed

ext/date/lib/interval.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static void sort_old_to_new(timelib_time **one, timelib_time **two, timelib_rel_
6262
if (
6363
(*one)->zone_type == TIMELIB_ZONETYPE_ID &&
6464
(*two)->zone_type == TIMELIB_ZONETYPE_ID &&
65-
(strcmp((*one)->tz_info->name, (*two)->tz_info->name) != 0)
65+
(strcmp((*one)->tz_info->name, (*two)->tz_info->name) == 0)
6666
) {
6767
if (
6868
((*one)->y > (*two)->y) ||
@@ -198,7 +198,7 @@ timelib_rel_time *timelib_diff(timelib_time *one, timelib_time *two)
198198
{
199199
timelib_rel_time *rt;
200200

201-
if (one->zone_type == TIMELIB_ZONETYPE_ID && two->zone_type == TIMELIB_ZONETYPE_ID) {
201+
if (one->zone_type == TIMELIB_ZONETYPE_ID && two->zone_type == TIMELIB_ZONETYPE_ID && strcmp(one->tz_info->name, two->tz_info->name) == 0) {
202202
return timelib_diff_with_tzid(one, two);
203203
}
204204

0 commit comments

Comments
 (0)