#40932 [NEW]: Timezone ignored
| From: | chrisw at kc dot net dot nz | Date: | Tue, 27 Mar 2007 21:09:26 +0000 |
| Subject: | #40932 [NEW]: Timezone ignored | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-110852@lists.php.net to get a copy of this message | ||
From: chrisw at kc dot net dot nz
Operating system: Windows XP
PHP version: 4.4.6
PHP Bug Type: Date/time related
Bug description: Timezone ignored
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 bug report at http://bugs.php.net/?id=40932&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40932&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40932&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40932&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40932&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40932&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40932&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40932&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40932&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40932&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40932&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40932&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40932&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40932&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40932&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40932&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40932&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40932&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40932&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40932&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40932&r=mysqlcfg