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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
38 + 46 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 18:01:32 2024 UTC