From:             xuefer at 21cn dot com
Operating system: cygwin
PHP version:      5CVS-2005-07-02 (dev)
PHP Bug Type:     Date/time related
Bug description:  Cannot find any timezone setting

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 bug report at http://bugs.php.net/?id=33545&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=33545&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=33545&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=33545&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=33545&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=33545&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=33545&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=33545&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=33545&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=33545&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=33545&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=33545&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=33545&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=33545&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=33545&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=33545&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=33545&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=33545&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=33545&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=33545&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=33545&r=mysqlcfg

Reply via email to