From 31a1c1e67c93de186d8faf368784a8745b23f5b1 Mon Sep 17 00:00:00 2001 From: Joe Watkins Date: Wed, 19 Jun 2019 12:42:00 +0200 Subject: fix setcookie Max-Age to use php_time --- ext/standard/head.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/standard/head.c b/ext/standard/head.c index e3a35c9c26..f57b8b02ed 100644 --- a/ext/standard/head.c +++ b/ext/standard/head.c @@ -154,7 +154,7 @@ PHPAPI int php_setcookie(zend_string *name, zend_string *value, time_t expires, strlcat(cookie, ZSTR_VAL(dt), len + 100); zend_string_free(dt); - diff = difftime(expires, time(NULL)); + diff = difftime(expires, php_time()); if (diff < 0) { diff = 0; } -- cgit v1.2.1