Class: TZInfo::VirtualTimezone
- Inherits:
-
Timezone
- Object
- Timezone
- TZInfo::VirtualTimezone
- Defined in:
- lib/tzinfo/virtual_timezone.rb
Class Method Summary collapse
Instance Method Summary collapse
- #identifier ⇒ Object
-
#period_for_utc(_utc) ⇒ Object
Returns the TimezonePeriod based on the given seconds from GMT.
-
#periods_for_local(_local) ⇒ Object
Returns the array of TimezonePeriod based on the given seconds from GMT.
Class Method Details
.new(seconds_from_gmt) ⇒ Object
3 4 5 6 7 |
# File 'lib/tzinfo/virtual_timezone.rb', line 3 def self.new(seconds_from_gmt) vt = super() vt.send(:setup, seconds_from_gmt) vt end |
Instance Method Details
#identifier ⇒ Object
19 20 21 |
# File 'lib/tzinfo/virtual_timezone.rb', line 19 def identifier "secondsFromGMT##{@seconds_from_gmt}" end |
#period_for_utc(_utc) ⇒ Object
Returns the TimezonePeriod based on the given seconds from GMT.
10 11 12 |
# File 'lib/tzinfo/virtual_timezone.rb', line 10 def period_for_utc(_utc) TimezonePeriod.new(nil, nil, @offset) end |
#periods_for_local(_local) ⇒ Object
Returns the array of TimezonePeriod based on the given seconds from GMT.
15 16 17 |
# File 'lib/tzinfo/virtual_timezone.rb', line 15 def periods_for_local(_local) [TimezonePeriod.new(nil, nil, @offset)] end |