note 76193 deleted from function.gmmktime by danbrown

From: Date: Sun, 20 Jul 2008 03:18:00 +0000
Subject: note 76193 deleted from function.gmmktime by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-142046@lists.php.net to get a copy of this message
Note Submitter: dim dot zol at gmail dot com ---- Robert, Your mismatch is due to the subtraction of date('Y'). You must do an addition instead. <?php echo date('Y-m-d H:i:s', time() + intval(date('Z')))."\n"; echo date('Y-m-d H:i:s', gmmktime()); ?> Returns: 2007-07-04 08:03:01 2007-07-04 08:03:01 Take a closer look at the value returned by date('Y') and you will see that anything West of the UTC is negative; hence, it should not be added, not subtracted.

« previous php.notes (#142046) next »