note 46067 added to function.mktime

From: Date: Tue, 28 Sep 2004 14:24:36 +0000
Subject: note 46067 added to function.mktime
Groups: php.notes 
Request: Send a blank email to php-notes+get-77522@lists.php.net to get a copy of this message
mktime should be used when removing cookies. Normally people tend to use: time()-3600 to set the expiration date in "the past". The problem with this is that some computers is set at a wrong date and therfore differs from the server-time. That will render the time()-3600 unusable. Instead use mktime(12,0,0,1, 1, 1990) as you expiration criteria. I'm convinced that only a very few users has set their time back more than 1990 :) ---- Manual Page -- http://www.php.net/manual/en/function.mktime.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+46067 Delete -- http://master.php.net/manage/user-notes.php?action=delete+46067&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+46067&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#77522) next »