From:             a dot schilder at gmx dot de
Operating system: Windows XP Home
PHP version:      5.1.1
PHP Bug Type:     Date/time related
Bug description:  Timezone error date_default_timezone_get()

Description:
------------
Using date_default_timezone_get() without having set a timezone before,
produces an error:

"It is not safe to rely on the system's timezone settings. Please use the
date.timezone setting, the TZ environment variable or the
date_default_timezone_set() function. We selected 'Europe/Paris' for
'1.0/no DST' instead".

I want to check the current timezone and this should be the correct
function for it. I want to get a result to work with

Reproduce code:
---------------
<?php
echo date_default_timezone_get();
?>

Expected result:
----------------
Get an empty string, like with "ini_get('date.timezone')"). Also false or
null would be okay.

Actual result:
--------------
Error message.

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

Reply via email to