note 51646 deleted from function.date by nlopess
| From: | nlopess@php.net | Date: | Wed, 06 Apr 2005 13:48:43 +0000 |
| Subject: | note 51646 deleted from function.date by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-87577@lists.php.net to get a copy of this message | ||
Note Submitter: frip at nm dot ru
Reason: useless
----
If you have problems with timezone, I can purpose that function:
function zdate($format, $time=0) {
$offset=8;
if (!$time) {
$zonedate=date($format, time()+$offset*3600);
} else {
$zonedate=date($format, $time+$offset*3600);
}
return $zonedate;
}
Very simple, but usefull codepart.
Just choose $offsett and use zdate (); instead of the date (); function.