View Full Version : Cookie expiry problem

09-05-2007, 08:29 AM
I'm making a system which creates generates a download link which is active for one hour only. I wanted to make it cookie based, but I'm having troubles setting the expiry time of the cookie correctly:

$timestamp = time();
$expires = $timestamp + 3600;
setcookie("DOWNLOAD_ID", $hash, $expires);

In Firefox the cookie is set correctly to expire in one hour from the current local time.
In IE and Opera it sets the expiry time to one hour in GMT.

The server is in the same timezone as the client machine (for now). How to I make sure that the expiry time of the cookie is set to 1 hour in local time ?