#40934 [Opn]: putenv("TZ=xxxx") doesn't reset correctly
| From: | derick@php.net | Date: | Wed, 28 Mar 2007 07:09:42 +0000 |
| Subject: | #40934 [Opn]: putenv("TZ=xxxx") doesn't reset correctly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-110859@lists.php.net to get a copy of this message | ||
ID: 40934
Updated by: derick@php.net
Reported By: vaughn at solarword dot net
Status: Open
-Bug Type: Date/time related
+Bug Type: Scripting Engine problem
Operating System: Windows NT XANADU 5.2 build 3790
PHP Version: 5.2.1
New Comment:
Come comments:
- don't use the TZ env var for setting timezones
- don't use broken timezone identifiers like CST6DST
See:
- http://no.php.net/manual/en/function.date-default-timezone-set.php
- http://no.php.net/manual/en/timezones.php
Previous Comments:
------------------------------------------------------------------------
[2007-03-28 06:06:36] vaughn at solarword dot net
Description:
------------
Using Stock PHP5.2.1 msi package downloaded from php.net (Same bug
appeared in php-4.3.11) Apache version=2.0.53
Problem: The first time that TZ is set, that value becomes the new
default for future php runs.
This doesn't appear to be like bug #37908 as the apache logs timestamps
are not changed.
PHP Configure line:
cscript /nologo configure.js "--enable-snapshot-build"
"--with-gd=shared"
Apache config:
PHPIniDir "D:/PHP5/"
LoadModule php5_module "D:\\PHP5\\php5apache2.dll"
-------------------------------
diff php-dist.ini php.ini
-------------------------------
128c128
< short_open_tag = Off
---
> short_open_tag = On
300c300
< max_execution_time = 30 ; Maximum execution time of each script,
in seconds
---
> max_execution_time = 300 ; Maximum execution time of each script,
in seconds
347,349c347,350
< ; - Show all errors, except coding standards warnings
< ;
< error_reporting = E_ALL
---
> ; - Show all errors
> ;
> #error_reporting = E_ALL
> error_reporting = E_ALL & ~E_NOTICE
374c375
< ignore_repeated_errors = Off
---
> ignore_repeated_errors = On
412a414
> error_log = "d:\php5\logfile.log"
513c515
< doc_root =
---
> doc_root = "d:\SJAtlanticus"
519a522,523
> extension_dir = "d:/PHP5/ext"
> ;extension_dir = "./"
638a643
> ;extension=php_filepro.dll
721c726,727
< SMTP = localhost
---
> #SMTP = localhost
> SMTP = xanadu
725c731
< ;sendmail_from = me@example.com
---
> sendmail_from = admin@sanjuanairlines.com
1013a1020
> session.save_path = d:/php/php_sessions
1051c1058,1059
< session.gc_probability = 1
---
> session.gc_probability = 0
> ;session.gc_probability = 1
1309a1318,1325
> [PHP_GD2]
> extension=php_gd2.dll
> [PHP_MBSTRING]
> extension=php_mbstring.dll
> [PHP_ZIP]
> extension=php_zip.dll
> [PHP_SMTP]
> extension=php_smtp.dll
Reproduce code:
---------------
<?
print getenv("TZ");
print "<br>";
putenv("TZ=CST6CDT");
print getenv("TZ");
?>
Expected result:
----------------
<br>CST6CDT
Actual result:
--------------
Output (1st)
<br>CST6CDT
Output (2nd)
CST6CDT<br>CST6CDT
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40934&edit=1