Class: TZInfo::InfoTimezone

Inherits:
Timezone show all
Defined in:
lib/tzinfo/info_timezone.rb

Overview

A Timezone based on a TimezoneInfo.

Direct Known Subclasses

DataTimezone, LinkedTimezone

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Timezone

#<=>, #_dump, _load, all, all_country_zone_identifiers, all_country_zones, all_data_zone_identifiers, all_data_zones, all_identifiers, all_linked_zone_identifiers, all_linked_zones, #current_period, #current_period_and_time, #eql?, #friendly_identifier, get, get_proxy, #hash, #inspect, #local_to_utc, #name, #now, #period_for_local, #period_for_utc, #periods_for_local, #strftime, #to_s, us_zone_identifiers, us_zones, #utc_to_local

Class Method Details

.new(info) ⇒ Object

Constructs a new InfoTimezone with a TimezoneInfo instance.



31
32
33
34
35
# File 'lib/tzinfo/info_timezone.rb', line 31

def self.new(info)      
  tz = super()
  tz.send(:setup, info)
  tz
end

Instance Method Details

#identifierObject

The identifier of the timezone, e.g. “Europe/Paris”.



38
39
40
# File 'lib/tzinfo/info_timezone.rb', line 38

def identifier
  @info.identifier
end