Class: TZInfo::DataTimezoneInfo
- Inherits:
-
TimezoneInfo
- Object
- TimezoneInfo
- TZInfo::DataTimezoneInfo
- Defined in:
- lib/tzinfo/data_timezone_info.rb
Overview
Represents a defined timezone containing transition data.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from TimezoneInfo
Instance Method Summary collapse
-
#create_timezone ⇒ Object
Constructs a Timezone instance for the timezone represented by this DataTimezoneInfo.
-
#period_for_utc(utc) ⇒ Object
Returns the TimezonePeriod for the given UTC time.
-
#periods_for_local(local) ⇒ Object
Returns the set of TimezonePeriods for the given local time as an array.
Methods inherited from TimezoneInfo
Constructor Details
This class inherits a constructor from TZInfo::TimezoneInfo
Instance Method Details
#create_timezone ⇒ Object
Constructs a Timezone instance for the timezone represented by this DataTimezoneInfo.
41 42 43 |
# File 'lib/tzinfo/data_timezone_info.rb', line 41 def create_timezone DataTimezone.new(self) end |
#period_for_utc(utc) ⇒ Object
Returns the TimezonePeriod for the given UTC time.
28 29 30 |
# File 'lib/tzinfo/data_timezone_info.rb', line 28 def period_for_utc(utc) raise NotImplementedError, 'Subclasses must override period_for_utc' end |
#periods_for_local(local) ⇒ Object
Returns the set of TimezonePeriods for the given local time as an array.
Results returned are ordered by increasing UTC start date. Returns an empty array if no periods are found for the given time.
35 36 37 |
# File 'lib/tzinfo/data_timezone_info.rb', line 35 def periods_for_local(local) raise NotImplementedError, 'Subclasses must override periods_for_local' end |