php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3977 date() function no more sensitive to TZ environment variable
Submitted: 2000-03-30 04:38 UTC Modified: 2001-01-09 04:06 UTC
From: peter dot kuppelwieser at limu dot com Assigned:
Status: Closed Package: *General Issues
PHP Version: 4.0 Release Candidate 1 OS: suse linux 6.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: peter dot kuppelwieser at limu dot com
New email:
PHP Version: OS:

 

 [2000-03-30 04:38 UTC] peter dot kuppelwieser at limu dot com
following script switches Timezones in PHP3
it does not work in PHP4

Is  there is an alternative not documented mechanism?

#--------------------
putenv("TZ=Europe/Rome");
echo date("Y/m/d H:i:s")." ".getenv("TZ")."<br>";

putenv("TZ=Asia/Seoul");
echo date("Y/m/d H:i:s")." ".getenv("TZ")."<br>";
#--------------------

#PHP CONFIG

System: Linux pjotr 2.2.13 #2 Wed Mar 15 10:13:54 CET 2000 i686 unknown
Build Date: Mar 29 2000 
Configure command: './configure' '--disable-debug' '--enable-track-vars' '--enable-trans-sid' '--with-apache=../apache_1.3.12' '--with-gd=/usr' '--with-mysql'
php.ini path: /usr/local/lib
ZEND_DEBUG=0
SAPI=Apache
ZTS is undefined

#/PHP CONFIG

Bye peter.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-02 05:08 UTC] sterling at cvs dot php dot net
This is fixed in PHP4.0.1
 [2000-07-11 11:29 UTC] peter dot kuppelwieser at limu dot com
I have now tesded tried the test script and it still does not behave correctely

The output is now unpredictable.
sometimes the timezone settings of Rome is used
and sometimes the timezone of Seoul is used 
both echo statements

(one run of test produces Seoul time)
2000/07/11 00:22:22 Europe/Rome
2000/07/11 00:22:22 Asia/Seoul

(another run of test producec Rome time)
2000/07/10 17:29:11 Europe/Rome
2000/07/10 17:29:11 Asia/Seoul

 [2001-01-09 04:06 UTC] sniper@php.net
Fixed in CVS. 

--Jani
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC