ID:               46166
 Updated by:       [EMAIL PROTECTED]
 Reported By:      wesleys at slakkie dot euronet dot nl
-Status:           Open
+Status:           Closed
 Bug Type:         Scripting Engine problem
 Operating System: Ubuntu 8.04
 PHP Version:      5.2.6


Previous Comments:
------------------------------------------------------------------------

[2008-09-24 23:04:36] wesleys at slakkie dot euronet dot nl

Never mind, I just realized I do have a TZ configured in my enviroment,
which is not set for the Apache user. If I unset the TZ variable it does
return the error. You can close this bug.

------------------------------------------------------------------------

[2008-09-24 12:06:49] wesleys at slakkie dot euronet dot nl

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 this bug report at http://bugs.php.net/?id=46166&edit=1

Reply via email to