Skip to content

Commit 466a34d

Browse files
committed
Revert "date module, replacing abs call with the llabs's like one due to bigger type"
This reverts commit c189845.
1 parent 22b6ab3 commit 466a34d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ext/date/php_date.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2290,8 +2290,8 @@ static HashTable *date_object_get_properties(zval *object) /* {{{ */
22902290

22912291
ZSTR_LEN(tmpstr) = snprintf(ZSTR_VAL(tmpstr), sizeof("+05:00"), "%c%02d:%02d",
22922292
utc_offset < 0 ? '-' : '+',
2293-
php_date_llabs(utc_offset / 3600),
2294-
php_date_llabs(((utc_offset % 3600) / 60)));
2293+
abs(utc_offset / 3600),
2294+
abs(((utc_offset % 3600) / 60)));
22952295

22962296
ZVAL_NEW_STR(&zv, tmpstr);
22972297
}
@@ -2382,8 +2382,8 @@ static HashTable *date_object_get_properties_timezone(zval *object) /* {{{ */
23822382

23832383
ZSTR_LEN(tmpstr) = snprintf(ZSTR_VAL(tmpstr), sizeof("+05:00"), "%c%02d:%02d",
23842384
tzobj->tzi.utc_offset < 0 ? '-' : '+',
2385-
php_date_llabs(tzobj->tzi.utc_offset / 3600),
2386-
php_date_llabs(((tzobj->tzi.utc_offset % 3600) / 60)));
2385+
abs(tzobj->tzi.utc_offset / 3600),
2386+
abs(((tzobj->tzi.utc_offset % 3600) / 60)));
23872387

23882388
ZVAL_NEW_STR(&zv, tmpstr);
23892389
}
@@ -3912,8 +3912,8 @@ PHP_FUNCTION(timezone_name_get)
39123912

39133913
ZSTR_LEN(tmpstr) = snprintf(ZSTR_VAL(tmpstr), sizeof("+05:00"), "%c%02d:%02d",
39143914
utc_offset < 0 ? '-' : '+',
3915-
php_date_llabs(utc_offset / 3600),
3916-
php_date_llabs(((utc_offset % 3600) / 60)));
3915+
abs(utc_offset / 3600),
3916+
abs(((utc_offset % 3600) / 60)));
39173917

39183918
RETURN_NEW_STR(tmpstr);
39193919
}

0 commit comments

Comments
 (0)