]> granicus.if.org Git - php/commitdiff
Turns out that more than 1% of users clocks are more than a year out of date, this...
authorScott MacVicar <scottmac@php.net>
Tue, 10 May 2011 19:09:24 +0000 (19:09 +0000)
committerScott MacVicar <scottmac@php.net>
Tue, 10 May 2011 19:09:24 +0000 (19:09 +0000)
I can only guess its due to batteries on the motherboard being dead.

ext/standard/head.c

index 7ecf9b9ecdde7f2abf105c369c00f882ce5036be..edaf7674634b11916760c825d33ee25e11233318 100644 (file)
@@ -115,10 +115,9 @@ PHPAPI int php_setcookie(char *name, int name_len, char *value, int value_len, t
                /* 
                 * MSIE doesn't delete a cookie when you set it to a null value
                 * so in order to force cookies to be deleted, even on MSIE, we
-                * pick an expiry date 1 year and 1 second in the past
+                * pick an expiry date 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 TSRMLS_CC);
+               dt = php_format_date("D, d-M-Y H:i:s T", sizeof("D, d-M-Y H:i:s T")-1, 1, 0 TSRMLS_CC);
                snprintf(cookie, len + 100, "Set-Cookie: %s=deleted; expires=%s", name, dt);
                efree(dt);
        } else {