Returns an immutable set of canonical system time zone IDs.
The result set is a subset of {@link #getSystemZIDs()}, but not
including aliases, such as "US/Eastern".
@return An immutable set of canonical system time zone IDs.
197407
private static synchronized Set<String> getCanonicalSystemZIDs() {
        Set<String> canonicalSystemZones = null;
        if (REF_CANONICAL_SYSTEM_ZONES != null) {
            canonicalSystemZones = REF_CANONICAL_SYSTEM_ZONES.get();
        }
        if (canonicalSystemZones == null) {
            Set<String> canonicalSystemIDs = new TreeSet<String>();
            String[] allIDs = getZoneIDs();
            for (String id : allIDs) {
                // exclude Etc/Unknown
                if (id.equals(TimeZone.UNKNOWN_ZONE_ID)) {
                    continue;
                }
                String canonicalID = getCanonicalCLDRID(id);
                if (id.equals(canonicalID)) {
                    canonicalSystemIDs.add(id);
                }
            }
            canonicalSystemZones = Collections.unmodifiableSet(canonicalSystemIDs);
            REF_CANONICAL_SYSTEM_ZONES = new SoftReference<Set<String>>(canonicalSystemZones);
        }
        return canonicalSystemZones;
    }
679504
function getTimezoneList() {

		$regions = [
			\DateTimeZone::AFRICA,
			\DateTimeZone::AMERICA,
			\DateTimeZone::ANTARCTICA,
			\DateTimeZone::ASIA,
			\DateTimeZone::ATLANTIC,
			\DateTimeZone::AUSTRALIA,
			\DateTimeZone::EUROPE,
			\DateTimeZone::INDIAN,
			\DateTimeZone::PACIFIC,
		];

		$timezones = array();

		foreach( $regions as $region ) {

			$timezones = array_merge( $timezones, \DateTimeZone::listIdentifiers( $region ) );
		}

		$timezone_offsets = array();

		foreach( $timezones as $timezone ) {

			$tz = new \DateTimeZone( $timezone );

			$timezone_offsets[$timezone] = $tz->getOffset( new DateTime );
		}

		// sort timezone by offset
		asort( $timezone_offsets );

		$timezone_list = array();

		foreach( $timezone_offsets as $timezone => $offset ) {

			$offset_prefix		= $offset < 0 ? '-' : '+';
			$offset_formatted 	= gmdate( 'H:i', abs($offset) );

			$pretty_offset 		= "UTC${offset_prefix}${offset_formatted}";

			$timezone_list[$timezone] = "(${pretty_offset}) $timezone";
		}

		return $timezone_list;
	}
632555
public String getGenericLocationName(String canonicalTzID) {
        if (canonicalTzID == null || canonicalTzID.length() == 0) {
            return null;
        }
        String name = _genericLocationNamesMap.get(canonicalTzID);
        if (name != null) {
            if (name.length() == 0) {
                // empty string to indicate the name is not available
                return null;
            }
            return name;
        }

        Output<Boolean> isPrimary = new Output<Boolean>();
        String countryCode = ZoneMeta.getCanonicalCountry(canonicalTzID, isPrimary);
        if (countryCode != null) {
            if (isPrimary.value) {
                // If this is only the single zone in the country, use the country name
                String country = getLocaleDisplayNames().regionDisplayName(countryCode);
                name = formatPattern(Pattern.REGION_FORMAT, country);
            } else {
                // If there are multiple zones including this in the country,
                // use the exemplar city name

                // getExemplarLocationName should return non-empty String
                // if the time zone is associated with a location
                String city = _tznames.getExemplarLocationName(canonicalTzID);
                name = formatPattern(Pattern.REGION_FORMAT, city);
            }
        }

        if (name == null) {
            _genericLocationNamesMap.putIfAbsent(canonicalTzID.intern(), "");
        } else {
            synchronized (this) {   // we have to sync the name map and the trie
                canonicalTzID = canonicalTzID.intern();
                String tmp = _genericLocationNamesMap.putIfAbsent(canonicalTzID, name.intern());
                if (tmp == null) {
                    // Also put the name info the to trie
                    NameInfo info = new NameInfo(canonicalTzID, GenericNameType.LOCATION);
                    _gnamesTrie.put(name, info);
                } else {
                    name = tmp;
                }
            }
        }
        return name;
    }
1018206
@Override
    public TimeZone cloneAsThawed() {
        JavaTimeZone tz = (JavaTimeZone)super.cloneAsThawed();
        tz.javatz = (java.util.TimeZone)javatz.clone();
        tz.javacal = new java.util.GregorianCalendar(javatz);  // easier than synchronized javacal.clone()
        tz.isFrozen = false;
        return tz;
    }
871924
public java.util.List<String> getScheduledInstanceIds() {
        if (scheduledInstanceIds == null) {
            scheduledInstanceIds = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return scheduledInstanceIds;
    }
279014
def get_timezones():
    
    base_dir = _DIRECTORY
    zones = ()

    for root, dirs, files in os.walk(base_dir):
        for basename in files:
            zone = os.path.join(root, basename)
            if os.path.isdir(zone):
                continue

            zone = os.path.relpath(zone, base_dir)

            with open(os.path.join(root, basename), 'rb') as fd:
                if fd.read(4) == b'TZif' and zone not in INVALID_ZONES:
                    zones = zones + (zone,)

    return tuple(sorted(zones))
982107
public static TimeZoneNames getInstance(ULocale locale) {
        String key = locale.getBaseName();
        return TZNAMES_CACHE.getInstance(key, locale);
    }
941610
public static function getTimeZones()
    {
        $timezones = [];

        foreach (DateTimeZone::listIdentifiers() as $timezone) {
            $timezones[$timezone] = str_replace('_', ' ', $timezone);
        }

        return $timezones;
    }
336843
public static String getThreadDefaultTzid() throws TimezonesException {
    final String id = threadTzid.get();

    if (id != null) {
      return id;
    }
    return getSystemDefaultTzid();
  }
318175
public TimezoneAssignment getTimezoneById(String tzid) {
		for (TimezoneAssignment assignment : assignments) {
			VTimezone component = assignment.getComponent();
			if (component == null) {
				continue;
			}

			String componentId = ValuedProperty.getValue(component.getTimezoneId());
			if (tzid.equals(componentId)) {
				return assignment;
			}
		}
		return null;
	}
1284504
public static function listTimezones() {
        if (self::$timezones === null) {
            self::$timezones = array();
            $offsets = array();
            $now = new DateTime();

            foreach (DateTimeZone::listIdentifiers() as $timezone) {
                $now->setTimezone(new DateTimeZone($timezone));
                $offsets[] = $offset = $now->getOffset();
                self::$timezones[$timezone] = '(' . self::formatGmtOffset($offset) . ') ' . self::formatTimezoneName($timezone);
            }

            array_multisort($offsets, self::$timezones);
        }

        return self::$timezones;
    }
999732
public java.util.List<String> getZoneIds() {
        if (zoneIds == null) {
            zoneIds = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return zoneIds;
    }
712525
@Override
    public String getReferenceZoneID(String mzID, String region) {
        return TimeZoneNamesImpl._getReferenceZoneID(mzID, region);
    }
571748
public ZonedDateTime getStartZonedDateTime() {
        if (zonedStartDateTime == null) {
            zonedStartDateTime = ZonedDateTime.of(startDate, startTime, zoneId);
        }

        return zonedStartDateTime;
    }
139354
public CacheId[] getCacheIds(){
		CacheId[] cacheIds = new CacheId[configEntry.cacheIds.length];
		for ( int i=0; i<configEntry.cacheIds.length; i++ ){
			cacheIds[i] = new CacheId(configEntry.cacheIds[i]);
		}
		return cacheIds;
	}
814093
public Collection<VTimezone> getComponents() {
		List<VTimezone> components = new ArrayList<VTimezone>(assignments.size());
		for (TimezoneAssignment assignment : assignments) {
			VTimezone component = assignment.getComponent();
			if (component != null) {
				components.add(component);
			}
		}
		return Collections.unmodifiableList(components);
	}
671387
public java.util.List<String> getHostIdSet() {
        if (hostIdSet == null) {
            hostIdSet = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return hostIdSet;
    }