Skip to content

Commit 818b46a

Browse files
committed
Import timelib 2021.18
1 parent 44377c3 commit 818b46a

8 files changed

+123
-113
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) ||
@@ -200,7 +200,7 @@ timelib_rel_time *timelib_diff(timelib_time *one, timelib_time *two)
200200
{
201201
timelib_rel_time *rt;
202202

203-
if (one->zone_type == TIMELIB_ZONETYPE_ID && two->zone_type == TIMELIB_ZONETYPE_ID) {
203+
if (one->zone_type == TIMELIB_ZONETYPE_ID && two->zone_type == TIMELIB_ZONETYPE_ID && strcmp(one->tz_info->name, two->tz_info->name) == 0) {
204204
return timelib_diff_with_tzid(one, two);
205205
}
206206

0 commit comments

Comments
 (0)