diff options
author | Remi Collet <remi@php.net> | 2018-02-14 08:59:24 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2018-02-14 08:59:24 +0100 |
commit | 528bc00d84cce18d74528677c156d6aec1b7fcd9 (patch) | |
tree | 982945c60fd00f3f7fda8506b761c8676c900037 /ext/date | |
parent | 2cc8cf299422074c1e32f7c328fb93229aa68790 (diff) | |
download | php-git-528bc00d84cce18d74528677c156d6aec1b7fcd9.tar.gz |
Fix timezone var_dump from 51f2a5803fa4f09e212fed4b14ab8b4a003d4ef5
Diffstat (limited to 'ext/date')
-rw-r--r-- | ext/date/php_date.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 82ac9a6502..2df19f718a 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2422,9 +2422,9 @@ static HashTable *date_object_get_debug_info_timezone(zval *object, int *is_temp zend_string *tmpstr = zend_string_alloc(sizeof("UTC+05:00")-1, 0); ZSTR_LEN(tmpstr) = snprintf(ZSTR_VAL(tmpstr), sizeof("+05:00"), "%c%02d:%02d", - tzobj->tzi.utc_offset > 0 ? '-' : '+', - abs(tzobj->tzi.utc_offset / 60), - abs((tzobj->tzi.utc_offset % 60))); + tzobj->tzi.utc_offset < 0 ? '-' : '+', + abs((int)(tzobj->tzi.utc_offset / 3600)), + abs(((int)(tzobj->tzi.utc_offset % 3600) / 60))); ZVAL_NEW_STR(&zv, tmpstr); } |