Skip to content

Commit 528bc00

Browse files
committed
Fix timezone var_dump from 51f2a58
1 parent 2cc8cf2 commit 528bc00

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/date/php_date.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2422,9 +2422,9 @@ static HashTable *date_object_get_debug_info_timezone(zval *object, int *is_temp
24222422
zend_string *tmpstr = zend_string_alloc(sizeof("UTC+05:00")-1, 0);
24232423

24242424
ZSTR_LEN(tmpstr) = snprintf(ZSTR_VAL(tmpstr), sizeof("+05:00"), "%c%02d:%02d",
2425-
tzobj->tzi.utc_offset > 0 ? '-' : '+',
2426-
abs(tzobj->tzi.utc_offset / 60),
2427-
abs((tzobj->tzi.utc_offset % 60)));
2425+
tzobj->tzi.utc_offset < 0 ? '-' : '+',
2426+
abs((int)(tzobj->tzi.utc_offset / 3600)),
2427+
abs(((int)(tzobj->tzi.utc_offset % 3600) / 60)));
24282428

24292429
ZVAL_NEW_STR(&zv, tmpstr);
24302430
}

0 commit comments

Comments
 (0)