#46166 [Opn->Csd]: E_STRICT error reporing not working correctly

From: Date: Thu, 25 Sep 2008 02:29:18 +0000
Subject: #46166 [Opn->Csd]: E_STRICT error reporing not working correctly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-129237@lists.php.net to get a copy of this message
ID: 46166 Updated by: lbarnaud@php.net 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

« previous php.bugs (#129237) next »