note 61674 deleted from function.date by derick

From: Date: Sun, 11 Jun 2006 11:43:16 +0000
Subject: note 61674 deleted from function.date by derick
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-114250@lists.php.net to get a copy of this message
Note Submitter: ---- VERY SIMPLY CONVERT GMT TO YOUR TIMEZONE! set the $TimeDiff with number of hours difference your time zone is from GMT. Example (PST with Day light savings accounted for): ****************************************** ****************************************** $TimeDiff = 7+date('I'); $TimeZoneEpoc = time() - ($TimeDiff*60*60); $currentDate = date('n/j/y',$TimeZoneEpoc); $currentTime = date('g:i A',$TimeZoneEpoc); ****************************************** ****************************************** the "date('I')" part is where it accounts for day light savings.

« previous php.notes (#114250) next »