note 37510 added to function.mktime

From: Date: Tue, 18 Nov 2003 13:42:02 +0000
Subject: note 37510 added to function.mktime
Groups: php.notes 
Request: Send a blank email to php-notes+get-60564@lists.php.net to get a copy of this message
With regard to Example 1 and using mktime to correct out-of-range input. It should be noted that mktime will implement day light saving amends. Consider the following: <? print(date("d/m/Y H:i:s",mktime(0,0,0,3,(27 + 1),2004))); ?> OUTPUT "28/03/2004 02:00:00" <? print(date("d/m/Y H:i:s",(mktime(0,0,0,3,27,2004) + (((1 * 24) * 60) * 60)))); ?> OUTPUT "28/03/2004 00:00:00" Dependent on your requirements this may or may be desirable ---- Manual Page -- http://www.php.net/manual/en/function.mktime.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+37510 Delete -- http://master.php.net/manage/user-notes.php?action=delete+37510&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+37510&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#60564) next »