Mombu the Php Forum

Go Back   Mombu the Php Forum > Php > #40934 : putenv("TZ=xxxx") doesn't reset correctly
User Name
Password
REGISTER NOW! Mark Forums Read




Reply Bookmark and Share
1 6th October 18:13
derick
External User
 
Posts: 1
Default #40934 : putenv("TZ=xxxx") doesn't reset correctly



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...mezone-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
---

300c300
< max_execution_time = 30 ; Maximum execution time of each script,
in seconds
---

in seconds
347,349c347,350
< ; - Show all errors, except coding standards warnings
< ;
< error_reporting = E_ALL
---


374c375
< ignore_repeated_errors = Off
---

412a414

513c515
< doc_root =
---

519a522,523


638a643

721c726,727
< SMTP = localhost
---


725c731
< ;sendmail_from = me@example.com
---

1013a1020

1051c1058,1059
< session.gc_probability = 1
---


1309a1318,1325


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
  Reply With Quote


 


Reply


Thread Tools
Display Modes


Some other forums that might be of your interest : Php 5 forum, Apache forum, Iis forum, Functions forum, Classes forum, Librarys forum, Bugs forum, Postgres forum, Mysql forum, Paradox forum, Ms sql forum, Configurations forum, Php.ini forum, Problems forum, Scripting forum, Css forum, General forums, Off-topic talk, Links, Extra forums, Php


Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666