|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #53593 phpinfo() triggers system timezone warning
Submitted: 2010-12-22 04:57 UTC Modified: 2010-12-22 11:02 UTC
From: anthon dot pang at gmail dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.3.4 OS: Ubuntu 10.04
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: anthon dot pang at gmail dot com
New email:
PHP Version: OS:


 [2010-12-22 04:57 UTC] anthon dot pang at gmail dot com
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;

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:

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-22 11:02 UTC]
-Status: Open +Status: Bogus
 [2010-12-22 11:02 UTC]
You have to set a correct timezone in your php.ini, doing it will kill this warning.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 22 06:01:31 2024 UTC