Class: RiCal::FloatingTimezone

Inherits:
Object
  • Object
show all
Defined in:
lib/ri_cal/floating_timezone.rb

Overview

FloatingTimezone represents the ‘time zone’ for a time or date time with no timezone Times with floating timezones are always interpreted in the timezone of the observer

Class Method Summary collapse

Class Method Details

.identifierObject

:nodoc:



6
7
8
# File 'lib/ri_cal/floating_timezone.rb', line 6

def self.identifier #:nodoc:
  nil
end

.local_to_utc(time) ⇒ Object

Return the time unchanged



24
25
26
# File 'lib/ri_cal/floating_timezone.rb', line 24

def self.local_to_utc(time)
  time.with_floating_timezone.to_ri_cal_date_time_value
end

.rational_utc_offset(local) ⇒ Object

:nodoc:



14
15
16
# File 'lib/ri_cal/floating_timezone.rb', line 14

def self.rational_utc_offset(local) #:nodoc:
  @offset = RiCal.RationalOffset[0]
end

.tzinfo_timezoneObject

:nodoc:



10
11
12
# File 'lib/ri_cal/floating_timezone.rb', line 10

def self.tzinfo_timezone #:nodoc:
  nil
end

.utc_to_local(time) ⇒ Object

Return the time unchanged



19
20
21
# File 'lib/ri_cal/floating_timezone.rb', line 19

def self.utc_to_local(time)
  time.with_floating_timezone.to_ri_cal_date_time_value
end