#44129 [Opn->Bgs]: Halt-hour timezones returning UTC
ID: 44129
Updated by: derick@php.net
Reported By: protomank at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: *General Issues
Operating System: Windows XP
PHP Version: 5.2.5
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Right, that's not a bug then. Please use date.timezone ini setting to
set your timezone - that's what it's for.
Previous Comments:
------------------------------------------------------------------------
[2008-02-15 14:57:42] protomank at gmail dot com
Hum, forgot to mention I was running it under Apache 2.2, sorry :(
But it doesn't affect the bug anyway.
The bug doesn't happen when you pass the timezone to PHP, but when you
change the timezone in Windows and then execute simply:
php echo date("T");
This returns UTC instead of IST.
Seems like PHP is not able to correctly reading the Timezone from
Windows environment, so it does not know what is the system timezone.
------------------------------------------------------------------------
[2008-02-15 13:29:05] jani@php.net
# php -n -d date.timezone=Asia/Calcutta -r 'echo date("T");'
IST
So you're just using wrong timezone name..?
------------------------------------------------------------------------
[2008-02-15 13:12:09] protomank at gmail dot com
Description:
------------
If I set the windows timzeone to a zone with half-hour, like 5:30
(clacuttah) date('T') returns UTC.
This way I can't convert timestamps to the correct time of the machine.
Reproduce code:
---------------
date('T')
Expected result:
----------------
Asia/Calcuttah
Actual result:
--------------
UTC
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44129&edit=1
Thread (4 messages)