Sha256: d5e41c3900b696424501a07415d4f4485ad9e66057e0877aafbafc99fc0364b4

Contents?: true

Size: 1.16 KB

Versions: 33

Compression:

Stored size: 1.16 KB

Contents

describe :time_gmt_offset, :shared => true do
  it "returns the offset in seconds between the timezone of time and UTC" do
    with_timezone("AST", 3) do
      Time.new.send(@method).should == 10800
    end
  end
if System.get_property('platform') != 'APPLE'
  it "returns the correct offset for US Eastern time zone around daylight savings time change" do
    with_timezone("EST5EDT") do
      Time.local(2010,3,14,1,59,59).send(@method).should == -5*60*60
      if System.get_property('platform') != 'WINDOWS'
        Time.local(2010,3,14,2,0,0).send(@method).should == -4*60*60
      end  
    end
  end
end
  #it "returns the correct offset for Hawaii around daylight savings time change" do
  #  with_timezone("Pacific/Honolulu") do
  #    Time.local(2010,3,14,1,59,59).send(@method).should == -10*60*60
  #    Time.local(2010,3,14,2,0,0).send(@method).should == -10*60*60
  #  end
  #end

  #it "returns the correct offset for New Zealand around daylight savings time change" do
  #  with_timezone("Pacific/Auckland") do
  #    Time.local(2010,4,4,1,59,59).send(@method).should == 13*60*60
  #    Time.local(2010,4,4,3,0,0).send(@method).should == 12*60*60
  #  end
  #end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
rhodes-3.3.5 spec/framework_spec/app/spec/core/time/shared/gmt_offset.rb
rhodes-3.3.4 spec/framework_spec/app/spec/core/time/shared/gmt_offset.rb
rhodes-3.3.3 spec/framework_spec/app/spec/core/time/shared/gmt_offset.rb
rhodes-3.3.3.beta.4 spec/framework_spec/app/spec/core/time/shared/gmt_offset.rb
rhodes-3.3.3.beta.3 spec/framework_spec/app/spec/core/time/shared/gmt_offset.rb
rhodes-3.3.3.beta.2 spec/framework_spec/app/spec/core/time/shared/gmt_offset.rb
rhodes-3.3.3.beta.1 spec/framework_spec/app/spec/core/time/shared/gmt_offset.rb
rhodes-3.3.2 spec/framework_spec/app/spec/core/time/shared/gmt_offset.rb
rhodes-3.3.2.beta.7 spec/framework_spec/app/spec/core/time/shared/gmt_offset.rb
rhodes-3.3.2.beta.6 spec/framework_spec/app/spec/core/time/shared/gmt_offset.rb
rhodes-3.3.2.beta.5 spec/framework_spec/app/spec/core/time/shared/gmt_offset.rb
rhodes-3.3.2.beta.4 spec/framework_spec/app/spec/core/time/shared/gmt_offset.rb
rhodes-3.3.2.beta.3 spec/framework_spec/app/spec/core/time/shared/gmt_offset.rb
rhodes-3.3.2.beta.2 spec/framework_spec/app/spec/core/time/shared/gmt_offset.rb
rhodes-3.3.2.beta.1 spec/framework_spec/app/spec/core/time/shared/gmt_offset.rb
rhodes-3.3.1 spec/framework_spec/app/spec/core/time/shared/gmt_offset.rb
rhodes-3.3.0 spec/framework_spec/app/spec/core/time/shared/gmt_offset.rb
rhodes-3.3.0.beta.3 spec/framework_spec/app/spec/core/time/shared/gmt_offset.rb
rhodes-3.3.0.beta.2 spec/framework_spec/app/spec/core/time/shared/gmt_offset.rb
rhodes-3.3.0.beta.1 spec/framework_spec/app/spec/core/time/shared/gmt_offset.rb