Class: RiCal::FloatingTimezone

Inherits:
Object
  • Object
show all
Defined in:
lib/ri_cal/time_with_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/time_with_floating_timezone.rb', line 9

def self.identifier #:nodoc:
  nil
end

.local_to_utc(time) ⇒ Object

Return the time unchanged #:nodoc:



23
24
25
# File 'lib/ri_cal/time_with_floating_timezone.rb', line 23

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

.tzinfo_timezoneObject

:nodoc:



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

def self.tzinfo_timezone #:nodoc:
  nil
end

.utc_to_local(time) ⇒ Object

Return the time unchanged #:nodoc:



18
19
20
# File 'lib/ri_cal/time_with_floating_timezone.rb', line 18

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