|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-02-15 13:12 UTC] 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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 10 09:00:01 2025 UTC |
# php -n -d date.timezone=Asia/Calcutta -r 'echo date("T");' IST So you're just using wrong timezone name..?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.