Are time zones going to be fixed?
| From: | Lance Lovette | Date: | Tue, 12 Dec 2000 22:27:47 +0000 |
| Subject: | Are time zones going to be fixed? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-29969@lists.php.net to get a copy of this message | ||
I am being forced to revert back to PHP 3 because I have the same issue with
PHP 4.03PL1 as described in a list posting from October. I tested the latest
snapshot and it has the same issues. Does anyone have a patch to make time
zones work properly?
Excerpts from the original post:
http://marc.theaimsgroup.com/?l=php-general&m=97157283226980&w=2
I'm having trouble switching time zones within one PHP 4 script:
$t = time();
// Switch to Amsterdam time (gmt+2)
putenv("TZ=Europe/Amsterdam");
echo date("H:i",$t)."<br>";
// Switch to London time (gmt+1)
putenv("TZ=Europe/London");
echo date("H:i",$t)."<br>";
// Switch back to Amsterdam time (gmt+2)
putenv("TZ=Europe/Amsterdam");
echo date("H:i",$t);
This outputs:
03:08
03:08
03:08
The second line should be 02:08.