src/ICal/ICal.php
protected function isValidIanaTimeZoneId($timeZone)
    {
        if (in_array($timeZone, $this->validTimeZones)) {
            return true;
        }

        $valid = array();
        $tza   = timezone_abbreviations_list();

        foreach ($tza as $zone) {
            foreach ($zone as $item) {
                $valid[$item['timezone_id']] = true;
            }
        }

        unset($valid['']);

        if (isset($valid[$timeZone]) || in_array($timeZone, timezone_identifiers_list(\DateTimeZone::ALL_WITH_BC))) {
            $this->validTimeZones[] = $timeZone;

            return true;
        }

        return false;
    }
protected function isValidIanaTimeZoneId($timeZone)
    {
        if (in_array($timeZone, $this->validTimeZones)) {
            return true;
        }

        $valid = array();
        $tza   = timezone_abbreviations_list();

        foreach ($tza as $zone) {
            foreach ($zone as $item) {
                $valid[$item['timezone_id']] = true;
            }
        }

        unset($valid['']);

        if (isset($valid[$timeZone]) || in_array($timeZone, timezone_identifiers_list(\DateTimeZone::ALL_WITH_BC))) {
            $this->validTimeZones[] = $timeZone;

            return true;
        }

        return false;
    }
protected function isValidIanaTimeZoneId ( $ timeZone ) { if ( in_array ( $ timeZone , $ this -> validTimeZones ) ) { return true ; } $ valid = array ( ) ; $ tza = timezone_abbreviations_list ( ) ; foreach ( $ tza as $ zone ) { foreach ( $ zone as $ item ) { $ valid [ $ item [ 'timezone_id' ] ] = true ; } } unset ( $ valid [ '' ] ) ; if ( isset ( $ valid [ $ timeZone ] ) || in_array ( $ timeZone , timezone_identifiers_list ( \ DateTimeZone :: ALL_WITH_BC ) ) ) { $ this -> validTimeZones [ ] = $ timeZone ; return true ; } return false ; }
Checks if a time zone is a valid IANA time zone

@param  string $timeZone
@return boolean
Checks if a time zone is a valid IANA time zone