note 48598 added to function.date

From: Date: Fri, 31 Dec 2004 21:34:29 +0000
Subject: note 48598 added to function.date
Groups: php.notes 
Request: Send a blank email to php-notes+get-82521@lists.php.net to get a copy of this message
Regarding timezone handling: Adding 5 to the current hour for Eastern is great, but then you have to deal with daylight savings and know the GMT offset for anything you want to support. However, PHP running as a module under Apache (at least on *NIX; YMMV on Windows) will obey the TZ environment variable, which can be set with putenv(). Any timezone your server supports can be put into that variable, so you can do any of the following: putenv('TZ=EST5EDT'); putenv('TZ=US/Eastern'); putenv('TZ=America/New_York'); date() will then convert the time for you, and the T and Z formats will give back the right information, too. ---- Manual Page -- http://www.php.net/manual/en/function.date.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+48598 Delete -- http://master.php.net/manage/user-notes.php?action=delete+48598&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48598&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48598&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48598&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48598&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48598&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+48598&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#82521) next »