Edit report at http://bugs.php.net/bug.php?id=53593&edit=1

 ID:                 53593
 Updated by:         [email protected]
 Reported by:        anthon dot pang at gmail dot com
 Summary:            phpinfo() triggers system timezone warning
-Status:             Open
+Status:             Bogus
 Type:               Feature/Change Request
 Package:            Unknown/Other Function
 Operating System:   Ubuntu 10.04
 PHP Version:        5.3.4
 Block user comment: N
 Private report:     N

 New Comment:

You have to set a correct timezone in your php.ini, doing it will kill
this warning.


Previous Comments:
------------------------------------------------------------------------
[2010-12-22 04:57:36] anthon dot pang at gmail dot com

Description:
------------
phpinfo() should not output raw warning because:



1) it is redundant; the table already states: Default timezone
America/New_York



2) phpinfo() is not a date/time function, even if it uses one
internally;
http://php.net/manual/en/function.date-default-timezone-set.php



3) the warning is emitted between rows of an HTML table, resulting in
invalid markup



Propose either suppressing the warning, or pretty printing it, so it
doesn't break the layout.



Test script:
---------------
<?php phpinfo();

Actual result:
--------------
date



Warning: phpinfo() [function.phpinfo]: It is not safe to rely on the
system's timezone settings. You are *required* to use the date.timezone
setting 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
'America/New_York' for 'EST/-5.0/no DST' instead in
/path_to_script/phpinfo.php on line 1


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



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=53593&edit=1

Reply via email to