ID: 34859 Updated by: [EMAIL PROTECTED] Reported By: mdlawler at gwmicro dot com -Status: Assigned +Status: Bogus Bug Type: Date/time related Operating System: Windows PHP Version: 5CVS-2005-10-13 (snap) Assigned To: derick New Comment:
Not a bug, you need to set it to one of the constants you find on the following documentation page. This behavior changed in PHP 5.1: http://www.php.net/manual/en/timezones.america.php Even better would to not use the TZ env var, but isntead use the date.timezone setting in php.ini to the correct Timezone Identifier. Previous Comments: ------------------------------------------------------------------------ [2005-10-13 20:19:48] [EMAIL PROTECTED] Assigned to the maintainer. ------------------------------------------------------------------------ [2005-10-13 19:48:11] mdlawler at gwmicro dot com Description: ------------ With the current 5.1RC2 snap setting the TZ environment variable to EST5 which is the correct setting for Indiana in the US doesn't work correctly. Setting TZ to something like EST5EDT CST6CDT, PST8PDT etc does work. Reproduce code: --------------- <? $date = date("h:i:s", time()); echo "Date: $date"; ?> Expected result: ---------------- I expect to see the correct time accounting for my time zone. Actual result: -------------- It was actually 09:52:28 AM and the date was printed as the following PM Date: 02:52:28 PHP Notice: date(): Timezone setting (date.timezone) or TZ environment variable contains an unknown timezone. in E:\tz.php on line 2 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34859&edit=1