note 45024 added to function.date

From: Date: Mon, 23 Aug 2004 19:23:31 +0000
Subject: note 45024 added to function.date
Groups: php.notes 
Request: Send a blank email to php-notes+get-75176@lists.php.net to get a copy of this message
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 ---- Manual Page -- http://www.php.net/manual/en/function.date.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45024 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45024&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45024&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#75176) next »