php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53804 IntlDateFormatter class does not support Asia/Kathmandu
Submitted: 2011-01-21 15:58 UTC Modified: 2011-01-22 08:36 UTC
From: belfilie at ie dot ibm dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.3SVN-2011-01-21 (SVN) OS: Win XP, Win 2003 Server
Private report: No CVE-ID: None
 [2011-01-21 15:58 UTC] belfilie at ie dot ibm dot com
Description:
------------
The version of PHP is 5.3.2

We are using the IntlDateFormatter library and have noticed that if we pass as timezone 'Asia/Katmandu' it works correctly and resolves it to Nepal time, however it does not recognize 'Asia/Kathmandu' as a valid Olsen timezone.

According to this page (http://php.net/manual/en/timezones.asia.php) both spellings are recognized by PHP and according to this page (http://www.oracle.com/technetwork/java/javase/tzdata-versions-138805.html) Java has included a change from Katmandu to Kathmandu in its 1.4 release.

Will Asia/Kathmandu be supported by this library?

Thanks

Test script:
---------------
Just create a new instance of the IntlDateFormatter class, and pass in "Asia/Kathmandu" as its last parameter (the timezone). By comparison, try also passing in "Asia/Katmandu".

Expected result:
----------------
As a temporary workaround we have put in a little hack so we test the value of the timezone and if it's equal to 'Asia/Kathmandu' we replace it with 'Asia/Katmandu'. But ideally the library should support both spellings!


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-22 08:35 UTC] stas@php.net
I realize it might be a bit confusing but IntlDateFormatter actually uses ICU 
timezones, not PHP timezones. Those are supposed to be the same, since both derive 
from CLDR timezone database, but if you have an old ICU library, it may fall 
behind. Unfortunately, there's not other way around it but upgrading you ICU 
library.
 [2011-01-22 08:36 UTC] stas@php.net
-Status: Open +Status: Bogus
 [2011-01-22 08:36 UTC] stas@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Dec 16 12:00:01 2025 UTC