error_log to specified file does not log time according to date.timezone
| Bug #49627 | error_log to specified file does not log time according to date.timezone | ||||
|---|---|---|---|---|---|
| Submitted: | 2009-09-22 17:16 UTC | Modified: | 2009-10-05 13:57 UTC | ||
| From: | mp at icomme dot fr | Assigned: | dmitry (profile) | ||
| Status: | Closed | Package: | Date/time related | ||
| PHP Version: | 5.2.11 | OS: | FreeBSD 7.2 | ||
| Private report: | No | CVE-ID: | None | ||
[2009-09-22 17:16 UTC] mp at icomme dot fr
Description:
------------
When php.ini is configured with "error_log" to a specified file (not via syslog), PHP does not log date and time of records (errors, warnings, etc.) according to the "date.timezone" configured in php.ini, it's always recorded with GMT time.
PHP (5.2.6) used to work correctly with this.
OS and PHP have correct time zone :
$ date
Tue Sep 22 19:05:32 CEST 2009
... time on OS is correctly configured : CEST = GMT+2
print date('r T');
print gmdate('r T');
... respectivly returns :
Tue, 22 Sep 2009 19:06:12 +0200 CEST
Tue, 22 Sep 2009 17:06:12 +0000 GMT
... PHP correctly configured
Box :
FreeBSD 7.2-RELEASE (GENERIC)
Apache/2.2.13 (Unix)
PHP 5.2.11
Someone says (bug 45191) this bug has been fixed in CVS on May 2009, but 2 versions of the 5.2 branch had been released since this date, and the bug is still present.
Reproduce code:
---------------
# php.ini :
; Log errors to specified file.
error_log = "/var/log/php/php-error.log"
; Defines the default timezone used by the date functions
date.timezone = "Europe/Paris"
# test.php :
nonexistantfunction();
Expected result:
----------------
[22-Sep-2009 18:57:55] PHP Fatal error: Call to undefined function nonexistantfunction() in /usr/home/michel/public_html/plante.php on line 9
Actual result:
--------------
[22-Sep-2009 16:57:55] PHP Fatal error: Call to undefined function nonexistantfunction() in /usr/home/michel/public_html/plante.php on line 9
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2009-09-22 20:37 UTC] jani@php.net
[2009-10-05 13:57 UTC] dmitry@php.net