Re: date() is hours behind

From: Date: Tue, 30 Sep 2003 01:01:18 +0000
Subject: Re: date() is hours behind
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-164325@lists.php.net to get a copy of this message
See the putenv() function. For example to get the correct Eastern Standard Time http://www.php.net/putenv <?php putenv('TZ=US/Eastern'); echo 'Last modified: ' . date('d/m/y H:i', getlastmod()); ?> -- Jon Kriek http://phpfreaks.com "Php Webmaster" <phpwadmin@phpwebmaster.co.uk> wrote in message news:20030929232143.99386.qmail@pb1.pair.com... > Hi all, > > I currently use: > > date("l jS F Y, g:i A"); > > To format the current date/time to my personal preference. > > However, at 12:19 AM on my machine, date("l jS F Y, g:i A"); shows 4:19PM... > 8 hours slow :( > > Any ideas on how to correct this? Am I right in saying that there is a > timezone problem? > > Any ideas appreciated.

« previous php.general (#164325) next »