private static function isValidTimezone(string $timezone): bool
    {
        // @codeCoverageIgnoreStart
        if (self::$timezones === null) {
            self::$timezones = [];
            foreach (timezone_identifiers_list() as $zone) {
                self::$timezones[$zone] = true;
            }
        }
        // @codeCoverageIgnoreEnd

        return isset(self::$timezones[$timezone]);
    }
private static function isValidTimezone(string $timezone): bool
    {
        // @codeCoverageIgnoreStart
        if (self::$timezones === null) {
            self::$timezones = [];
            foreach (timezone_identifiers_list() as $zone) {
                self::$timezones[$zone] = true;
            }
        }
        // @codeCoverageIgnoreEnd

        return isset(self::$timezones[$timezone]);
    }
private static function isValidTimezone ( string $ timezone ) : bool { // @codeCoverageIgnoreStart if ( self :: $ timezones === null ) { self :: $ timezones = [ ] ; foreach ( timezone_identifiers_list ( ) as $ zone ) { self :: $ timezones [ $ zone ] = true ; } } // @codeCoverageIgnoreEnd return isset ( self :: $ timezones [ $ timezone ] ) ; }
Checks if a timezone string is valid

@param string $timezone The timezone string

@return bool
Checks if a timezone string is valid