|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78309 error_log date output default timezone overrides date.timezone
Submitted: 2019-07-17 19:33 UTC Modified: 2019-07-18 11:26 UTC
From: ian dot lintner at workiva dot com Assigned:
Status: Open Package: *General Issues
PHP Version: 7.3.7 OS: aws-linux, alpine
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: ian dot lintner at workiva dot com
New email:
PHP Version: OS:


 [2019-07-17 19:33 UTC] ian dot lintner at workiva dot com
error_log emitted log entry timezone appears to be using the "Default Timezone" first and before falling back to date.timezone rather than just using date.timezone as the overriding variable.

So this maybe the expected behavior now, but the last error_log bugfix notes that I read the goal was to use date.timezone only, but there maybe superseding requirements that I missed or this is a feature request or documentation update.

After reading tracing the PHP source it appears error_log uses the user function:  php_format_date


Which uses guess timezone, which follows the fallback logic of 
* "Default Timezone"
* date.timezone
(I maybe wrong) 

The concern is in a web application where users may specify their default Timezone (e.g. Drupal) then error_log entries can have different timezones. 

Personally opinion date.timezone should be the timezone for error_log as it is an ini value rather than a mutable value that may change between session, request or execution. So the error log timezone can remain consistent across multiple servers, executions. just my $.02


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-07-18 11:26 UTC]
date.timezone is PHP_INI_ALL[1], though, so it can be changed
during runtime as well.

[1] <>
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Aug 15 05:01:25 2020 UTC