note 92209 added to function.gmmktime

From: Date: Tue, 14 Jul 2009 14:47:21 +0000
Subject: note 92209 added to function.gmmktime
Groups: php.notes 
Request: Send a blank email to php-notes+get-158280@lists.php.net to get a copy of this message
@Thomas That is not correct. I am not sure whether there were any changes in these two functions' specifications in the last year but mktime()'s values default to current local time values and gmmktime()'s values default to GMT time values as stated on their manual page. For that reason when used without parameters, mktime() and gmmktime() return both the same. You can try it, I did try it (I am Europe/Prague DST - that is +0200 that is 7200 seconds): <?php echo date ( 'j.n.Y H:i:s Z', mktime() ) . "\n"; echo date ( 'j.n.Y H:i:s Z', gmmktime() ) . "\n"; ?> Output is as expected: 14.7.2009 16:38:26 7200 14.7.2009 16:38:26 7200 ---- Server IP: 212.24.129.51 Probable Submitter: 90.179.46.86 ---- Manual Page -- http://www.php.net/manual/en/function.gmmktime.php Edit -- https://master.php.net/note/edit/92209 Del: integrated -- https://master.php.net/note/delete/92209/integrated Del: useless -- https://master.php.net/note/delete/92209/useless Del: bad code -- https://master.php.net/note/delete/92209/bad+code Del: spam -- https://master.php.net/note/delete/92209/spam Del: non-english -- https://master.php.net/note/delete/92209/non-english Del: in docs -- https://master.php.net/note/delete/92209/in+docs Del: other reasons-- https://master.php.net/note/delete/92209 Reject -- https://master.php.net/note/reject/92209 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#158280) next »