#50520 [Opn->WFx]: fallbackmap.h missing entry for GMT-8 without daylight saving time
| From: | derick@php.net | Date: | Fri, 18 Dec 2009 17:50:45 +0000 |
| Subject: | #50520 [Opn->WFx]: fallbackmap.h missing entry for GMT-8 without daylight saving time | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-145907@lists.php.net to get a copy of this message | ||
ID: 50520
Updated by: derick@php.net
Reported By: chikei at gmail dot com
-Status: Open
+Status: Wont fix
Bug Type: Date/time related
Operating System: FreeBSD 7.2
PHP Version: 5.3SVN-2009-12-18 (snap)
New Comment:
This fallback map is there for backwards compatible reasons *only*.
From PHP 5.1 onwards you are supposed to make this "date.timezone"
setting in php.ini. Relying on the system timezone is *not* going to
work properly. Therefore, I am not adding a mapping for UTC+8.
Previous Comments:
------------------------------------------------------------------------
[2009-12-18 16:39:39] chikei at gmail dot com
Description:
------------
In ext/date/lib/fallbackmap.h you have:
{ "krat", 0, 7, "Asia/Krasnoyarsk" },
{ "krast", 1, 8, "Asia/Krasnoyarsk" },
{ "jst", 0, 9, "Asia/Tokyo" },
but lots east Asia region do not use daylight saving time.
And in the test server if I use /usr/share/zoneinfo/Etc/GMT-8 as
/etc/localtime, I'll get tm_isdat == 0 after a simple localtime_r call,
which then resulting PHP think the timezone is UTC. (I removed
date.timezone entry in php.ini since i want PHP using OS's timezone
setting.)
Reproduce code:
---------------
Remove date.timezone entry in php.ini and use
/usr/share/zoneinfo/Etc/GMT-8 as /etc/localtime, then run
date_default_timezone_get()
Expected result:
----------------
Should return some timezone rest in GMT-8 region. (such as HongKong or
Asia/Vientiane)
Actual result:
--------------
Returns UTC
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50520&edit=1