|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2014-05-12 11:04 UTC] 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() ); PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 11:00:01 2025 UTC |
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!