From:             wesleys at slakkie dot euronet dot nl
Operating system: Ubuntu 8.04
PHP version:      5.2.6
PHP Bug Type:     Scripting Engine problem
Bug description:  E_STRICT error reporing not working correctly

Description:
------------
E_STRICT error messages should be logged when date() is called when there
is no timezone set via php.ini or via date-default-timezone-set when using
php-cli. Running the same code via Apache does trigger such a message.

When setting an incorrect timezone, the NOTICE is present in both cli and
mod_php.


Reproduce code:
---------------
# Nothing is set via php.ini or date_default_timezone_set()
# Tested in 5.2.[1346]
error_reporting(E_ALL | E_STRICT);
printf("Date: %s\n", date("Y-m-d H:i:s", time()));


Expected result:
----------------
Strict Standards: date() [function.date]: 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. In case
you used any of those methods and you are still getting this warning, you
most likely misspelled the timezone identifier. We selected 'Europe/Berlin'
for 'CEST/2.0/DST' instead in <file> on line <lineno>
Date: 2008-09-24 14:03:40 

Actual result:
--------------
Date: 2008-09-24 14:03:40 



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

Reply via email to