note 10139 added to date

From: Date: Fri, 15 Dec 2000 03:17:08 +0000
Subject: note 10139 added to date
Groups: php.notes 
Request: Send a blank email to php-notes+get-8751@lists.php.net to get a copy of this message
Setting the TZ environment variable does not change the date display in PHP4(tested on 4.03p1) unless you do a call to time() after the putenv. The only PHP4 datetime function that calls tzset() to update the timezone from the TZ environment variable seems to be time(). So in PHP4 I do putenv('TZ=Australia/Adelaide'); time(); // Used for sideeffect - does tzset print strftime("%Z\n"); putenv('TZ=Europe/Riga'); time(); // Used for sideeffect - does tzset print strftime("%Z\n"); http://www.php.net/manual/function.date.php

« previous php.notes (#8751) next »