Sha256: 263298e058ecf22e70ecd12d1fab9ba915affb895f1164b831f45eabcd10ac7e

Contents?: true

Size: 603 Bytes

Versions: 10

Compression:

Stored size: 603 Bytes

Contents

describe "NSString to NSTimeZone" do

  it "should parse timezone as UTC" do
    "UTC".nstimezone.secondsFromGMT.should == 0
  end
  
  it "should parse timezone as Asia/Tokyo" do
    "Asia/Tokyo".nstimezone.secondsFromGMT.should == 9 * 60 * 60
  end
  
  it "should parse timezone as Asia/Tokyo" do
    "UTC+9".nstimezone.secondsFromGMT.should == 9 * 60 * 60
  end
  
  it "should parse timezone as Asia/Tokyo" do
    "GMT+9".nstimezone.secondsFromGMT.should == 9 * 60 * 60
  end
  
  it "should parse timezone as Asia/Tokyo" do
    "+0900".nstimezone.secondsFromGMT.should == 9 * 60 * 60
  end
  
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
sugarcube-0.20.24 spec/nsstring_timezone_spec.rb
sugarcube-0.20.23 spec/nsstring_timezone_spec.rb
sugarcube-0.20.22 spec/nsstring_timezone_spec.rb
sugarcube-0.20.21 spec/nsstring_timezone_spec.rb
sugarcube-0.20.20 spec/nsstring_timezone_spec.rb
sugarcube-0.20.19 spec/nsstring_timezone_spec.rb
sugarcube-0.20.18 spec/nsstring_timezone_spec.rb
sugarcube-0.20.17 spec/nsstring_timezone_spec.rb
sugarcube-0.20.16 spec/nsstring_timezone_spec.rb
sugarcube-0.20.15 spec/nsstring_timezone_spec.rb