summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Watkins <krakjoe@php.net>2019-06-19 12:42:00 +0200
committerJoe Watkins <krakjoe@php.net>2019-06-19 12:42:00 +0200
commit31a1c1e67c93de186d8faf368784a8745b23f5b1 (patch)
treea82f838aa391388e0484d81aefdc3c5f165a3f4e
parent599b94ff14e9de2acd871b7db17e70e6c84dbe2b (diff)
downloadphp-git-31a1c1e67c93de186d8faf368784a8745b23f5b1.tar.gz
fix setcookie Max-Age to use php_time
-rw-r--r--ext/standard/head.c2
1 files changed, 1 insertions, 1 deletions
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;
}