Bug #78309 [NEW]: error_log date output default timezone overrides date.timezone
| From: | ian dot lintner at workiva dot com | Date: | Wed, 17 Jul 2019 19:33:46 +0000 |
| Subject: | Bug #78309 [NEW]: error_log date output default timezone overrides date.timezone | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-221848@lists.php.net to get a copy of this message | ||
From: ian dot lintner at workiva dot com
Operating system: aws-linux, alpine
PHP version: 7.3.7
Package: *General Issues
Bug Type: Bug
Bug description:error_log date output default timezone overrides date.timezone
Description:
------------
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
Source:
https://github.com/php/php-src/blob/3c2f433b2b0a4334b4f96358660ead92abdbb2cb/main/main.c#L888
Which uses guess timezone, which follows the fallback logic of
* "Default Timezone"
* date.timezone
* UTC
(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
--
Edit bug report at https://bugs.php.net/bug.php?id=78309&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=78309&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=78309&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=78309&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=78309&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78309&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78309&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78309&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78309&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78309&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78309&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78309&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78309&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78309&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=78309&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=78309&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78309&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78309&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78309&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78309&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78309&r=mysqlcfg