]> granicus.if.org Git - php/commitdiff
fix setcookie Max-Age to use php_time
authorJoe Watkins <krakjoe@php.net>
Wed, 19 Jun 2019 10:42:00 +0000 (12:42 +0200)
committerJoe Watkins <krakjoe@php.net>
Wed, 19 Jun 2019 10:42:00 +0000 (12:42 +0200)
ext/standard/head.c

index e3a35c9c260e52b6717b9fc311da0e7d2e58e2d1..f57b8b02edd2aca37a77ab8d700f12603eed513e 100644 (file)
@@ -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;
                        }