Bug #77582 [Com]: strftime no longer prints correct timezone
| From: | jflambert at newtrax dot com | Date: | Fri, 08 Feb 2019 01:22:47 +0000 |
| Subject: | Bug #77582 [Com]: strftime no longer prints correct timezone | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-219415@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77582&edit=1
ID: 77582
Comment by: jflambert at newtrax dot com
Reported by: jflambert at newtrax dot com
Summary: strftime no longer prints correct timezone
Status: Open
Type: Bug
Package: Date/time related
Operating System: Ubuntu 18.04
PHP Version: 7.3.2
Block user comment: N
Private report: N
New Comment:
Which part of php -i would be relevant?
Is it possibly related to my PHP ppa (ondrej)?
Some more details:
php > echo ini_get('date.timezone');
America/New_York
php > echo date_default_timezone_get();
America/New_York
php > echo strftime('%F %T %z %Z');
2019-02-08 01:19:00 +0000 GMT
php > echo phpinfo();
....
date
date/time support => enabled
timelib version => 2018.01RC3
"Olson" Timezone Database Version => 0.system
Timezone Database => internal
Default timezone => America/New_York
Directive => Local Value => Master Value
date.default_latitude => 31.7667 => 31.7667
date.default_longitude => 35.2333 => 35.2333
date.sunrise_zenith => 90.583333 => 90.583333
date.sunset_zenith => 90.583333 => 90.583333
date.timezone => America/New_York => America/New_York
Previous Comments:
------------------------------------------------------------------------
[2019-02-07 23:02:10] cmb@php.net
Works like expected on <https://3v4l.org/TdMW6>.
------------------------------------------------------------------------
[2019-02-07 22:33:18] jflambert at newtrax dot com
Description:
------------
The following test script used to work just fine in PHP 7.3.1. Only after the upgrade to php 7.3.2
did I start getting this issue.
Possibly other date functions are affected. But my unit tests stop immediately on failure. Also I
haven't changed anything to my environment in months/years. It very much seems to me like a new
7.3.2 issue, and I couldn't see anything in the 7.3.2 log about backwards incompatible changes.
php --version
PHP 7.3.2-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Feb 7 2019 18:01:56) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.2, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.2-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend
Technologies
with Xdebug v2.7.0rc1, Copyright (c) 2002-2019, by Derick Rethans
Test script:
---------------
php -a
Interactive mode enabled
php > var_dump(ini_get('date.timezone'));
php shell code:1:
string(16) "America/New_York"
php > echo strftime('%F %T %z');
2019-02-07 22:24:27 +0000
php > echo strftime('%Z');
GMT
Expected result:
----------------
php > echo strftime('%F<br />%T %Z');
2019-02-07<br />17:04:54 EST
Actual result:
--------------
Always seems to be GMT
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77582&edit=1