note 45024 deleted from function.date by derick
| From: | derick@php.net | Date: | Sun, 12 Jun 2005 11:43:35 +0000 |
| Subject: | note 45024 deleted from function.date by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-90291@lists.php.net to get a copy of this message | ||
Note Submitter: mahaffey at coaaa dot org
----
If you are having trouble getting date() to display the correct localtime with TimeZone and Daylight
Savings on a Windows workstation/server you might want to add the TZ environment variable to your
system:
TZ=tzn[+|-]hh[:mm[:ss] ][dzn]
Where
tzn = the 3 letter timezone abrevation
[+|-]hh= the optional +|- signed number for the timezone offset in hours to add to
the local time to get UTC(Universal Coordinated Time)
[:mm[:ss] = optional minutes and seconds offset with the hour.
[dzn] = the optional timezone abreviation for daylight savings time.
For example if you are at Easten Standard Time and your region uses Datlight Savings Time you would
use:
TZ=EST5EDT or TZ=EST+5EDT
echo date("T I"); //prints EDT 1 or EDT 0
If you do not use Daylight Saving Time:
TZ=EST5 or TZ=EST+5
echo date("T I"); //prints EST 0