Bug #67256 [Opn->Nab]: DateTimeZone::getTransitions

From: Date: Sun, 14 May 2017 18:34:02 +0000
Subject: Bug #67256 [Opn->Nab]: DateTimeZone::getTransitions
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209110@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67256&edit=1 ID: 67256 Updated by: heiglandreas@php.net Reported by: info at maxvis dot de Summary: DateTimeZone::getTransitions -Status: Open +Status: Not a bug Type: Bug Package: *General Issues Operating System: Windows/Linux PHP Version: 5.5.12 Block user comment: N Private report: N New Comment: First: There's no TypeTimeZone, so I expect you're talking about DateTimeZone. Second: What Transitions do you expect for a "Timezone" CET? It's central European Time. Offset to UTC +01:00 - And that NEVER changes! Because the "Timezone" with +02:00 Hours offset is CEST! The same applies for a "timezone" that's only defined by an offset! The Transitions can ONLY be returned for a VALID timezone like "Europe/Berlin"! CET is a "Timezone Abbreviation" and +01:00 is a "Timezone Offset". So there is a difference in "new DateTimezone('Europe/BErlin');", "new DateTimezone('CET');" and "new DAteTimezone('+01:00');" which is the timezone-type. Only Timezones with a timezone-type 3 can return a transition, the others can't because *they do not have one*! YOu might want to have a look at https://3v4l.org/v4iEK and https://3v4l.org/beumK By the way: DateTimezone::getLocation will *also* return false for Timezones of type 1 or 2! Previous Comments: ------------------------------------------------------------------------ [2017-05-10 09:26:09] bugs dot php dot net at chsc dot dk See also bug 74562. ------------------------------------------------------------------------ [2014-05-12 11:04:07] info at maxvis dot de Description: ------------ TypeTimeZone->getTransitions() return false --- From manual page: http://www.php.net/datetimezone.gettransitions --- Test script: --------------- $tz = new TypeTimeZone( 'CET' ); // Also GMT print_r( $tz->getTransitions() ); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67256&edit=1

« previous php.bugs (#209110) next »