diff options
author | Joe Watkins <krakjoe@php.net> | 2017-11-07 05:27:38 +0000 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2017-11-07 05:27:38 +0000 |
commit | c0b73c82afb8403e5792091b948295f4cee252ed (patch) | |
tree | 008b63b01b59a105f52bd1c1db08da8a9fe4f7f2 | |
parent | c33008339e604bccf5f9d2cf15a8aa49dd4977d7 (diff) | |
parent | c189845951ad40dcb85105320829aeb4cbd82d58 (diff) | |
download | php-git-c0b73c82afb8403e5792091b948295f4cee252ed.tar.gz |
Merge branch 'PHP-7.2'
* PHP-7.2:
date module, replacing abs call with the llabs's like one due to bigger type
-rw-r--r-- | ext/date/php_date.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index e6e7ef1c5b..eaae58106f 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2300,8 +2300,8 @@ static HashTable *date_object_get_properties(zval *object) /* {{{ */ ZSTR_LEN(tmpstr) = snprintf(ZSTR_VAL(tmpstr), sizeof("+05:00"), "%c%02d:%02d", utc_offset < 0 ? '-' : '+', - abs(utc_offset / 3600), - abs(((utc_offset % 3600) / 60))); + php_date_llabs(utc_offset / 3600), + php_date_llabs(((utc_offset % 3600) / 60))); ZVAL_NEW_STR(&zv, tmpstr); } @@ -2392,8 +2392,8 @@ static HashTable *date_object_get_properties_timezone(zval *object) /* {{{ */ ZSTR_LEN(tmpstr) = snprintf(ZSTR_VAL(tmpstr), sizeof("+05:00"), "%c%02d:%02d", tzobj->tzi.utc_offset < 0 ? '-' : '+', - abs(tzobj->tzi.utc_offset / 3600), - abs(((tzobj->tzi.utc_offset % 3600) / 60))); + php_date_llabs(tzobj->tzi.utc_offset / 3600), + php_date_llabs(((tzobj->tzi.utc_offset % 3600) / 60))); ZVAL_NEW_STR(&zv, tmpstr); } @@ -3936,8 +3936,8 @@ PHP_FUNCTION(timezone_name_get) ZSTR_LEN(tmpstr) = snprintf(ZSTR_VAL(tmpstr), sizeof("+05:00"), "%c%02d:%02d", utc_offset < 0 ? '-' : '+', - abs(utc_offset / 3600), - abs(((utc_offset % 3600) / 60))); + php_date_llabs(utc_offset / 3600), + php_date_llabs(((utc_offset % 3600) / 60))); RETURN_NEW_STR(tmpstr); } |