ID:               40932
 Updated by:       [EMAIL PROTECTED]
 Reported By:      chrisw at kc dot net dot nz
-Status:           Assigned
+Status:           Open
 Bug Type:         Date/time related
 Operating System: Windows XP
 PHP Version:      4.4.6
 Assigned To:      derick
 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


Works fine for me with PHP 5.2.1 - this is not going to work with PHP
4.x or 5.0.x as Windows uses different zone names. For PHP 5.1.x and
higher, use the date_default_timezone_set function instead of using
unreliable TZ environment vars.


Previous Comments:
------------------------------------------------------------------------

[2007-03-27 21:09:26] chrisw at kc dot net dot nz

Description:
------------
I get the same date() output regardless of TZ setting on Windows XP. I
suspect it must be a configuration error, as I get the same problem with
PHP 4.4.2, 4.4.6 and 5.2.1 with date.timezone = Pacific/Auckland
Have also tried on two separate Windows XP machines.
Doing this on Linux works fine and gives expected result.
Web Server is Apache 2.0.55

Reproduce code:
---------------
<?php
putenv("TZ=Pacific/Auckland");
echo "Pacific/Auckland Time: ". date("h:i:s a T")."<br/>";
putenv("TZ=Australia/Sydney");
echo "Australia/Sydney Time: ". date("h:i:s a T")."<br/>";
?>

Expected result:
----------------
I expect to see the timestamp for Pacific/Auckland to be GMT+12
I expect to see the timestamp for Australia/Sydney to be GMT+10




Actual result:
--------------
I get both times output identical as UTC/GMT

e.g.

Pacific/Auckland Time: 09:01:22 pm Pac
Australia/Sydney Time: 09:01:22 pm Aus


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=40932&edit=1

Reply via email to