note 93127 deleted from function.date by danbrown

From: Date: Tue, 25 Aug 2009 01:05:59 +0000
Subject: note 93127 deleted from function.date by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-159853@lists.php.net to get a copy of this message
Note Submitter: Aura at The World ---- Correction to below post: <?php $tz = date_default_timezone_get(); date_default_timezone_set('UTC'); for($i=0; $i<7; $i++) echo date('D', mktime(12, 0, 0, 1, $i+4, 1970)) . '<br />'; date_default_timezone_set($tz); ?> The previous version would fail if your time zone were 12 or more hours from UTC. If you know this will not be the case then it's safe to use, but if there's a chance your script will ever run on a server in one of those time zones, this is a better idea.

« previous php.notes (#159853) next »