php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64560 timezones missing from DateTimeZone::listIdentifiers()
Submitted: 2013-04-02 03:14 UTC Modified: 2014-09-22 13:27 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: nathan at healthengine dot com dot au Assigned: derick (profile)
Status: Not a bug Package: Date/time related
PHP Version: 5.4.13 OS: ubuntu 10.04
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nathan at healthengine dot com dot au
New email:
PHP Version: OS:

 

 [2013-04-02 03:14 UTC] nathan at healthengine dot com dot au
Description:
------------
Australia/ACT and Australia/Canberra timezones are missing from 
DateTimeZone::listIdentifiers() , they work correctly when creating a date eg $dt 
= new DateTime('now', 'Australia/Canberra')



Test script:
---------------
if (!in_array('Australia/Canberra', DateTimeZone::listIdentifiers())){
    echo "OH SHIT". "<br />";
}

Expected result:
----------------
expect result would be it says nothing but currently it says "OH SHIT"


Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-06-09 02:07 UTC] stas@php.net
-Assigned To: +Assigned To: derick
 [2014-09-22 13:27 UTC] derick@php.net
-Status: Assigned +Status: Not a bug
 [2014-09-22 13:27 UTC] derick@php.net
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

This is correct, you're expecting that a timezone identifier that should not be used in the default list of timezones to be returned. It's still *allowed* to be used for BC reasons, and if you want them to show up wit listIdentifiers, you need to tell it that you want BC timezone identifiers as well.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Mar 14 15:01:30 2025 UTC