note 32421 deleted from function.date by sniper

From: Date: Sat, 11 Oct 2003 16:54:04 +0000
Subject: note 32421 deleted from function.date by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-58294@lists.php.net to get a copy of this message
Note Submitter: designer(underscore)stubble(at)hotmail ---- Someone asked me how to adjust a time for daylight savings if the server stayed on GMT. Here's the best way I could think of. Just use the variable $Now whenever you need a date-time: //check if its GMT or DST...// if (date("I") == 1) {$Now = date("Y-m-d H:i:s",time()-3600);} else {$Now = date("Y-m-d H:i:s");}

« previous php.notes (#58294) next »