switching between timezones?

From: Date: Mon, 08 Jan 2001 03:53:00 +0000
Subject: switching between timezones?
Groups: php.general 
Request: Send a blank email to php-general+get-33172@lists.php.net to get a copy of this message
I noticed that there are still issues with switching between timezones. Is this a bug? And, if so is there any indication when it might be fixed. For example, given the following: <? # foo.php putenv("TZ=Greenwich"); echo date("H")."\n"; putenv("TZ=US/Central"); echo date("H")."\n"; putenv("TZ=Greenwich"); echo date("H")."\n"; ?> $./php3 foo.php Content-type: text/html 03 21 03 $./php4 foo.php X-Powered-By: PHP/4.0.1pl2 Content-type: text/html 03 03 03 $./php4.4 foo.php X-Powered-By: PHP/4.0.4 Content-type: text/html 03 03 03 Notice it worked in php3, but is failing within PHP 4 (including 4.0.4). Also notice that the first switch usually works; though, I've even noticed where the first putenv fails and the script stays within the local timezone. I also noticed there has been previous discussion (but no response?) on the topic: http://marc.theaimsgroup.com/?l=php-general&m=97666005518422&w=2 http://marc.theaimsgroup.com/?l=php-general&m=97157283226980&w=2 Any ideas? Seth

« previous php.general (#33172) next »