def get_timezone_info(identifier)
      result = @timezones[identifier]

      unless result
        # Thread-safety: It is possible that multiple equivalent TimezoneInfo
        # instances could be created here in concurrently executing threads. The
        # consequences of this are that the data may be loaded more than once
        # (depending on the data source). The performance benefit of ensuring
        # that only a single instance is created is unlikely to be worth the
        # overhead of only allowing one TimezoneInfo to be loaded at a time.

        result = load_timezone_info(identifier)
        @timezones[result.identifier] = result
      end

      result
    end
def get_timezone_info(identifier)
      result = @timezones[identifier]

      unless result
        # Thread-safety: It is possible that multiple equivalent TimezoneInfo
        # instances could be created here in concurrently executing threads. The
        # consequences of this are that the data may be loaded more than once
        # (depending on the data source). The performance benefit of ensuring
        # that only a single instance is created is unlikely to be worth the
        # overhead of only allowing one TimezoneInfo to be loaded at a time.

        result = load_timezone_info(identifier)
        @timezones[result.identifier] = result
      end

      result
    end
Initializes a new {DataSource} instance. Typically only called via
 subclasses of {DataSource}.
 Returns a {DataSources::TimezoneInfo} instance for the given identifier.
 The result will derive from either {DataSources::DataTimezoneInfo} for
 time zones that define their own data or {DataSources::LinkedTimezoneInfo}
 for links or aliases to other time zones.

 {get_timezone_info} calls {load_timezone_info} to create the
 {DataSources::TimezoneInfo} instance. The returned instance is cached and
 returned in subsequent calls to {get_timezone_info} for the identifier.

 @param identifier [String] A time zone identifier.
 @return [DataSources::TimezoneInfo] a {DataSources::TimezoneInfo} instance
   for a given identifier.
 @raise [InvalidTimezoneIdentifier] if the time zone is not found or the
   identifier is invalid.