php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5510 date() function and TZ environment (again)
Submitted: 2000-07-11 11:52 UTC Modified: 2001-01-09 04:07 UTC
From: peter dot kuppelwieser at limu dot com Assigned:
Status: Closed Package: *General Issues
PHP Version: 4.0.1pl2 OS: suse linux 6.3
Private report: No CVE-ID: None
 [2000-07-11 11:52 UTC] peter dot kuppelwieser at limu dot com
<?php
# similar as in bug #3977
#--------------------
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>";
#--------------------
/*
I have now 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 for
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 produces Rome time)
2000/07/10 17:29:11 Europe/Rome
2000/07/10 17:29:11 Asia/Seoul
*/
?>

strange isnt it?


configure statment:
'./configure' '--disable-debug' '--enable-track-vars' '--enable-trans-sid'
                                                                                 '--with-apache=../apache_1.3.12' '--with-gd=/usr' '--with-mysql'


bye peter!

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-04 21:01 UTC] sniper@php.net
I can not reproduce this with latest CVS. 
Please try php4.0.2 (or preferrably latest CVS) and reopen this bug
report if problem still exists.

--Jani
 [2001-01-09 04:07 UTC] sniper@php.net
This is now fixed in CVS (for real).

--Jani
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Mar 14 07:01:30 2025 UTC