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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: buskamuza at gmail dot com
New email:
PHP Version: OS:

 

 [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: Fri Nov 16 02:01:26 2018 UTC