php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54671 DateTimeZone::getTransitions returns empty array for certain timezones
Submitted: 2011-05-05 23:11 UTC Modified: 2017-01-12 20:04 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: buskamuza at gmail dot com Assigned:
Status: Wont fix Package: Date/time related
PHP Version: 5.2.17 OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2011-05-05 23:11 UTC] buskamuza at gmail dot com
Description:
------------
DateTimeZone::getTransitions() returns empty array for following timezones:
Etc/GMT+12
Etc/GMT-3
Atlantic/South_Georgia
Etc/GMT+3
Etc/GMT+5
Pacific/Port_Moresby

Fixed in 5.3, but not for 5.2

Test script:
---------------
foreach ($timezones as $timezone) {
    $dtz = new DateTimeZone($timezone);
    $transitions = $dtz->getTransitions();
    if (count($transitions) == 0) {
        echo $timezone . ": " . count($transitions)."<br>\n";
    }
}

Expected result:
----------------
Empty page (any timezone has transitions).

Actual result:
--------------
Etc/GMT+12: 0
Etc/GMT-3: 0
Atlantic/South_Georgia: 0
Etc/GMT+3: 0
Etc/GMT+5: 0
Pacific/Port_Moresby: 0

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-11 00:01 UTC] felipe@php.net
-Summary: DateTimeZone::getTransitions returns empty array fore certain timezones +Summary: DateTimeZone::getTransitions returns empty array for certain timezones
 [2017-01-12 20:04 UTC] heiglandreas@php.net
-Status: Open +Status: Wont fix
 [2017-01-12 20:04 UTC] heiglandreas@php.net
This targets an unsupported version of PHP. I'm therefore closing this.
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sat Nov 17 02:01:25 2018 UTC