diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 689e05fc92a..b4652386b71 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -645,6 +645,10 @@ PHPAPI void php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gmt) #endif } + if (!gmt) { + timelib_tzinfo_dtor(tzi); + } + buf = (char *) emalloc(buf_len); while ((real_len=strftime(buf, buf_len, format, &ta))==buf_len || real_len==0) { buf_len *= 2;