Class: RiCal::FloatingTimezone

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

Overview

  • ©2009 Rick DeNatale

  • All rights reserved. Refer to the file README.txt for the license

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:



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

def self.identifier #:nodoc:
  nil
end

.local_to_utc(time) ⇒ Object

Return the time unchanged



27
28
29
# File 'lib/ri_cal/floating_timezone.rb', line 27

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

.rational_utc_offset(local) ⇒ Object

:nodoc:



17
18
19
# File 'lib/ri_cal/floating_timezone.rb', line 17

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

.tzinfo_timezoneObject

:nodoc:



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

def self.tzinfo_timezone #:nodoc:
  nil
end

.utc_to_local(time) ⇒ Object

Return the time unchanged



22
23
24
# File 'lib/ri_cal/floating_timezone.rb', line 22

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