Cookie Expire Time - Client or Server?
| From: | Brandon Bell | Date: | Wed, 13 Sep 2000 00:52:50 +0000 |
| Subject: | Cookie Expire Time - Client or Server? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-16469@lists.php.net to get a copy of this message | ||
When setting the expire time of a cookie in PHP like:
setcookie ("TestCookie", $value, time()+300); /* expire in 5 minutes */
the time is obviously relative to the current time on the server.
If the client's clock isn't in sync with the server, isn't there a
problem as to when this cookie will actually expire?
What I want is for the cookie to expire after 5 minutes from the time it
was set, but if the client's clock has a different time than the
server's my guess is that the cookie will expire either faster or slower
than the 5 minutes that I want.
Can someone confirm my suspicions here. If I'm correct, does anyone
have a workaround?
Thanks!