We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 343cdb6 commit 303b4ccCopy full SHA for 303b4cc
1 file changed
ext/date/php_date.c
@@ -1946,13 +1946,15 @@ static zend_string *date_create_tz_offset_str(timelib_sll offset)
1946
int seconds = offset % 60;
1947
size_t size;
1948
const char *format;
1949
+
1950
if (seconds == 0) {
1951
size = sizeof("+05:00");
1952
format = "%c%02d:%02d";
1953
} else {
1954
size = sizeof("+05:00:01");
1955
format = "%c%02d:%02d:%02d";
1956
}
1957
1958
zend_string *tmpstr = zend_string_alloc(size - 1, 0);
1959
1960
/* Note: if seconds == 0, the seconds argument will be excessive and therefore ignored. */
0 commit comments