RETURN_FALSE;
}
- string = php_format_date(format, format_len, ts, localtime);
+ string = php_format_date(format, format_len, ts, localtime TSRMLS_CC);
RETVAL_STRING(string, 0);
}
/* }}} */
-PHPAPI char *php_format_date(char *format, int format_len, long ts, int localtime) /* {{{ */
+PHPAPI char *php_format_date(char *format, int format_len, long ts, int localtime TSRMLS_DC) /* {{{ */
{
timelib_time *t;
timelib_tzinfo *tzi;
#define _php_strftime php_strftime
PHPAPI void php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gm);
#endif
-PHPAPI char *php_format_date(char *format, int format_len, long ts, int localtime);
+PHPAPI char *php_format_date(char *format, int format_len, long ts, int localtime TSRMLS_DC);
#endif /* PHP_DATE_H */
* pick an expiry date 1 year and 1 second in the past
*/
time_t t = time(NULL) - 31536001;
- dt = php_format_date("D, d-M-Y H:i:s T", sizeof("D, d-M-Y H:i:s T")-1, t, 0);
+ dt = php_format_date("D, d-M-Y H:i:s T", sizeof("D, d-M-Y H:i:s T")-1, t, 0 TSRMLS_CC);
sprintf(cookie, "Set-Cookie: %s=deleted; expires=%s", name, dt);
efree(dt);
} else {
sprintf(cookie, "Set-Cookie: %s=%s", name, value ? encoded_value : "");
if (expires > 0) {
strcat(cookie, "; expires=");
- dt = php_format_date("D, d-M-Y H:i:s T", sizeof("D, d-M-Y H:i:s T")-1, expires, 0);
+ dt = php_format_date("D, d-M-Y H:i:s T", sizeof("D, d-M-Y H:i:s T")-1, expires, 0 TSRMLS_CC);
strcat(cookie, dt);
efree(dt);
}