ID: 33545
Updated by: [EMAIL PROTECTED]
Reported By: xuefer at 21cn dot com
-Status: Open
+Status: Feedback
Bug Type: Date/time related
Operating System: cygwin
PHP Version: 5CVS-2005-07-02 (dev)
-Assigned To:
+Assigned To: derick
New Comment:
Apparently the TV environment variable *is* set... you need to try to
figure out where this happens. If it's not set by yourself, you should
try to figure out why cygwin does this - that's obviously not PHP's
problem.
Previous Comments:
------------------------------------------------------------------------
[2005-07-02 06:45:15] xuefer at 21cn dot com
Description:
------------
PHP 5.1.0-dev (cgi-fcgi) (built: Jun 28 2005 11:49:30) (DEBUG)
unset TZ && php.exe a.php
Content-type: text/html
Warning: date(): Cannot find any timezone setting in
/usr/src/php5-debug/a.php on line 2
/usr/src/php5-debug/a.php(2) : Warning - date(): Cannot find any
timezone setting
putenv("TZ"); before date() is ok however.
------
96 env = getenv("TZ");
97 if (env) {
98 return env;
99 }
(gdb) br 98
Breakpoint 1 at 0x42453b: file /usr/src/php5-src/ext/date/php_date.c,
line 98.
(gdb) r
Breakpoint 1, guess_timezone ()
98 return env;
(gdb) p env
$1 = 0x100301a3 " -8"
but i can't figure where env TZ is set, not my shell nor my script
Reproduce code:
---------------
<?php
echo date("Y:m:d");
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33545&edit=1