Skip to content

Commit 72f3ac9

Browse files
committed
Fix ZTS RELEASE for date ext
1 parent dba4ced commit 72f3ac9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/date/php_date.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -795,8 +795,8 @@ static zend_string *date_format(char *format, size_t format_len, timelib_time *t
795795
offset->offset = (t->z);
796796
offset->leap_secs = 0;
797797
offset->is_dst = 0;
798-
offset->abbr = timelib_malloc(9); /* GMT±xxxx\0 */
799-
snprintf(offset->abbr, 9, "GMT%c%02d%02d",
798+
offset->abbr = timelib_malloc(13); /* GMT±xxxx\0 */
799+
snprintf(offset->abbr, 13, "GMT%c%02d%02d",
800800
(offset->offset < 0) ? '-' : '+',
801801
abs(offset->offset / 3600),
802802
abs((offset->offset % 3600) / 60));
@@ -1007,8 +1007,8 @@ PHPAPI int php_idate(char format, time_t ts, int localtime)
10071007
offset->offset = (t->z + (t->dst * 3600));
10081008
offset->leap_secs = 0;
10091009
offset->is_dst = t->dst;
1010-
offset->abbr = timelib_malloc(9); /* GMT±xxxx\0 */
1011-
snprintf(offset->abbr, 9, "GMT%c%02d%02d",
1010+
offset->abbr = timelib_malloc(13); /* GMT±xxxx\0 */
1011+
snprintf(offset->abbr, 13, "GMT%c%02d%02d",
10121012
(offset->offset < 0) ? '-' : '+',
10131013
abs(offset->offset / 3600),
10141014
abs((offset->offset % 3600) / 60));

0 commit comments

Comments
 (0)