web
07-06-2004, 05:57 PM
I'm writing a perl session management system that uses cookies.
I'm using the CGI.PM module to create and manage the cookies.
I want cookies to be deleted an hour after they're created. The problem I'm having is that the cookie expiration time is being based on the server's time, and I want it to be based on the time on the user's computer.
The way I place a cookie now is:
------------
$the_cookie = cookie(-name=>'login',
-value=>\%login,
-path=>'/',
-expires=>'+1h');
print header(-cookie=>the_cookie);
------------
Any ideas on how I could make it 1hour from the time on the user's computer instead of 1hour from the time on the server?
Thanks
I'm using the CGI.PM module to create and manage the cookies.
I want cookies to be deleted an hour after they're created. The problem I'm having is that the cookie expiration time is being based on the server's time, and I want it to be based on the time on the user's computer.
The way I place a cookie now is:
------------
$the_cookie = cookie(-name=>'login',
-value=>\%login,
-path=>'/',
-expires=>'+1h');
print header(-cookie=>the_cookie);
------------
Any ideas on how I could make it 1hour from the time on the user's computer instead of 1hour from the time on the server?
Thanks