note 92209 deleted from function.gmmktime by danbrown

From: Date: Tue, 14 Jul 2009 14:51:48 +0000
Subject: note 92209 deleted from function.gmmktime by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-158281@lists.php.net to get a copy of this message
Note Submitter: ales at ignition dot cz ---- @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

« previous php.notes (#158281) next »