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
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: 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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC