Bug #75975 [Opn->Fbk]: strftime prints current timezone instead of historical

From: Date: Fri, 15 Jan 2021 14:20:03 +0000
Subject: Bug #75975 [Opn->Fbk]: strftime prints current timezone instead of historical
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231581@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75975&edit=1 ID: 75975 Updated by: cmb@php.net Reported by: anton at zebooka dot com Summary: strftime prints current timezone instead of historical -Status: Open +Status: Feedback Type: Bug Package: Date/time related Operating System: macOS 10.13.3 PHP Version: 7.1.14 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: It appears that this may have been an issue with old timezone DBs[1]. Anyhow, can you still reproduce this with any of the actively supported PHP versions[2]? If so, which timezone DB version do you use? [1] <https://3v4l.org/hDXZc> [2] <https://www.php.net/supported-versions.php> Previous Comments: ------------------------------------------------------------------------ [2018-03-13 13:36:17] anton at zebooka dot com zebooka@zebooka-pro ~ $ uname -a Darwin zebooka-pro.local 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64 zebooka@zebooka-pro ~ $ php -r "date_default_timezone_set('Asia/Novosibirsk'); echo strftime('%Y-%m-%d %H:%M:%S %z', strtotime('2015-11-15'));" 2015-11-15 00:00:00 +0700 zebooka@zebooka-pro ~ $ php -v PHP 7.1.14 (cli) (built: Feb 2 2018 08:42:59) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies ------------------------------------------------------------------------ [2018-03-13 12:48:44] derick@php.net I can't reproduce this: [PHP: 7.1.15-dev ] derick@singlemalt:~ $ php -r "date_default_timezone_set('Asia/Novosibirsk'); echo strftime('%Y-%m-%d %H:%M:%S %z', strtotime('2015-11-15'));" 2015-11-15 00:00:00 +0600 ------------------------------------------------------------------------ [2018-03-13 12:08:36] cmb@php.net Oops, sorry, the OP was pretty clear about that. ------------------------------------------------------------------------ [2018-03-13 03:39:34] anton at zebooka dot com Yes it is. But +0700 is output with strftime, while it should be +0600 ------------------------------------------------------------------------ [2018-02-19 16:31:20] cmb@php.net Isn't +0600 to be expected given the zdump of your database? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=75975 -- Edit this bug report at https://bugs.php.net/bug.php?id=75975&edit=1

« previous php.bugs (#231581) next »