note 37606 added to function.mktime

From: Date: Thu, 20 Nov 2003 17:06:38 +0000
Subject: note 37606 added to function.mktime
Groups: php.notes 
Request: Send a blank email to php-notes+get-60707@lists.php.net to get a copy of this message
I think it is important to note that the timestamp returned is based upon the number of seconds from the epoch GMT, and then modified by the time zone settings on the server. Thus... mktime(0,0,0,1,1,1970) will not always return 0. For example with the US eastern time zone (GMT-5) will return 18000 (5 hours past the epoch) and the same function with the time zone set to the US pacific time zone (GMT-8) will return 28800 (8 hours past the epoch). In an instance where you want time zone independence, you should use the function gmmktime() ---- Manual Page -- http://www.php.net/manual/en/function.mktime.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+37606 Delete -- http://master.php.net/manage/user-notes.php?action=delete+37606&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+37606&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#60707) next »