RE: [PHP] Time is off?

From: Date: Wed, 25 Sep 2002 16:46:31 +0000
Subject: RE: [PHP] Time is off?
Groups: php.general 
Request: Send a blank email to php-general+get-117589@lists.php.net to get a copy of this message
Hi Brandon, > I did a basic script <? echo date('h:I'); ?> and the > time is off in that script [...] I have checked the > server time and the server hardware clock. Well, date("h:I") means "display the hours (in 12-hour format), followed by a colon, followed by a 1 or a 0 depending on whether daylight saving is in effect", so you're unlikely to get the correct time from it ;-) Give either date("h:ia") or date("H:i") a try - these are 12-hour and 24-hour times respectively. Cheers Jon

« previous php.general (#117589) next »