Sha256: bc2896b1195e2eed05f062d8450c982a069bdbd55348c9ca5252753267baf865

Contents?: true

Size: 776 Bytes

Versions: 15

Compression:

Stored size: 776 Bytes

Contents

module RiCal
  #- ©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 FloatingTimezone

    def self.identifier #:nodoc:
      nil
    end

    def self.tzinfo_timezone #:nodoc:
      nil
    end

  def self.rational_utc_offset(local) #:nodoc:
    Rational(0, 24)
  end

    # Return the time unchanged
    def self.utc_to_local(time)
      time.with_floating_timezone.to_ri_cal_date_time_value
    end

    # Return the time unchanged
    def self.local_to_utc(time)
      time.with_floating_timezone.to_ri_cal_date_time_value
    end
  end

end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
rubyredrick-ri_cal-0.0.10 lib/ri_cal/floating_timezone.rb
rubyredrick-ri_cal-0.0.11 lib/ri_cal/floating_timezone.rb
rubyredrick-ri_cal-0.0.3 lib/ri_cal/floating_timezone.rb
rubyredrick-ri_cal-0.0.4 lib/ri_cal/floating_timezone.rb
rubyredrick-ri_cal-0.0.5 lib/ri_cal/floating_timezone.rb
rubyredrick-ri_cal-0.0.6 lib/ri_cal/floating_timezone.rb
rubyredrick-ri_cal-0.0.7 lib/ri_cal/floating_timezone.rb
rubyredrick-ri_cal-0.0.8 lib/ri_cal/floating_timezone.rb
rubyredrick-ri_cal-0.0.9 lib/ri_cal/floating_timezone.rb
rubyredrick-ri_cal-0.5.0 lib/ri_cal/floating_timezone.rb
rubyredrick-ri_cal-0.5.1 lib/ri_cal/floating_timezone.rb
rubyredrick-ri_cal-0.5.2 lib/ri_cal/floating_timezone.rb
ri_cal-0.5.2 lib/ri_cal/floating_timezone.rb
ri_cal-0.5.0 lib/ri_cal/floating_timezone.rb
ri_cal-0.5.1 lib/ri_cal/floating_timezone.rb