Bug #61685 [Csd]: putenv('TZ=UTC') doesn't update timezone for localtime()

From: Date: Fri, 10 Jan 2020 16:15:05 +0000
Subject: Bug #61685 [Csd]: putenv('TZ=UTC') doesn't update timezone for localtime()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-224831@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=61685&edit=1 ID: 61685 Updated by: cmb@php.net Reported by: mattficken@php.net Summary: putenv('TZ=UTC') doesn't update timezone for localtime() Status: Closed Type: Bug Package: Calendar related Operating System: Windows PHP Version: 5.4.0 Assigned To: ab Block user comment: N Private report: N New Comment: For the record, this is a special case of bug #79051. The original test failure almost certainly occurred on a ZTS build, where putenv('TZ=UTC') does not work for the *current* process, because the internally called tzset() does not see the variable set via SetEnvironmentVariable(). Previous Comments: ------------------------------------------------------------------------ [2012-04-28 09:48:23] ab@php.net This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2012-04-27 23:01:22] pajoye@php.net Anatolyi, please apply it when you can :) ------------------------------------------------------------------------ [2012-04-27 22:50:14] derick@php.net Laruence, unixtojd is not part of the date extension, so this is a value bug report. The patch looks good, can you make a pull request against 5.3? ------------------------------------------------------------------------ [2012-04-27 22:27:13] mattficken@php.net Newest patch fixes test to work around the new behavior of putenv("TZ=UTC") and includes some more info about this problem. This patch works on 5.3.11 and 5.4.1 on Windows 7 and Gentoo (both x86 and x64). ------------------------------------------------------------------------ [2012-04-27 22:26:07] mattficken@php.net The following patch has been added/updated: Patch Name: 61685 Revision: 1335565567 URL: https://bugs.php.net/patch-display.php?bug=61685&patch=61685&revision=1335565567 ------------------------------------------------------------------------ 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=61685 -- Edit this bug report at https://bugs.php.net/bug.php?id=61685&edit=1

« previous php.bugs (#224831) next »