Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rubinius/rubinius
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2558f2bf0c09
Choose a base ref
...
head repository: rubinius/rubinius
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7f35e4518795
Choose a head ref
  • 2 commits
  • 4 files changed
  • 2 contributors

Commits on May 1, 2015

  1. Copy the full SHA
    659e2ac View commit details

Commits on May 2, 2015

  1. Merge pull request #3386 from fmfdias/add_specs_for_special_timezone_…

    …changes
    
    Add specs for cases where timezone used was changed.
    jc00ke committed May 2, 2015
    Copy the full SHA
    7f35e45 View commit details
Showing with 29 additions and 0 deletions.
  1. +23 −0 spec/ruby/core/time/shared/local.rb
  2. +2 −0 spec/tags/ruby/core/time/local_tags.txt
  3. +2 −0 spec/tags/ruby/core/time/mktime_tags.txt
  4. +2 −0 spec/tags/ruby/core/time/new_tags.txt
23 changes: 23 additions & 0 deletions spec/ruby/core/time/shared/local.rb
Original file line number Diff line number Diff line change
@@ -12,6 +12,29 @@
[0, 0, 0, 1, 1, 1910, 6, 1, false, "AMT"]
end
end

describe "timezone changes" do
it "correctly adjusts the timezone change to 'EET' on 'Europe/Istanbul'" do
with_timezone("Europe/Istanbul") do
Time.send(@method, 1910, 10, 1).to_a.should ==
[4, 3, 0, 1, 10, 1910, 6, 274, false, "EET"]
end
end

it "correctly adjusts the timezone change to 'WET' on 'Europe/Lisbon'" do
with_timezone("Europe/Lisbon") do
Time.send(@method, 1912, 1, 1).to_a.should ==
[45, 36, 0, 1, 1, 1912, 1, 1, false, "WET"]
end
end

it "correctly adjusts the timezone change to 'CEST' on 'Europe/Amsterdam'" do
with_timezone("Europe/Amsterdam") do
Time.send(@method, 1940, 5, 16).to_a.should ==
[0, 40, 1, 16, 5, 1940, 4, 137, true, "CEST"]
end
end
end
end

describe :time_local_10_arg, :shared => true do
2 changes: 2 additions & 0 deletions spec/tags/ruby/core/time/local_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fails:Time.local timezone changes correctly adjusts the timezone change to 'EET' on 'Europe/Istanbul'
fails:Time.local timezone changes correctly adjusts the timezone change to 'WET' on 'Europe/Lisbon'
2 changes: 2 additions & 0 deletions spec/tags/ruby/core/time/mktime_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fails:Time.mktime timezone changes correctly adjusts the timezone change to 'EET' on 'Europe/Istanbul'
fails:Time.mktime timezone changes correctly adjusts the timezone change to 'WET' on 'Europe/Lisbon'
2 changes: 2 additions & 0 deletions spec/tags/ruby/core/time/new_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fails:Time.new timezone changes correctly adjusts the timezone change to 'EET' on 'Europe/Istanbul'
fails:Time.new timezone changes correctly adjusts the timezone change to 'WET' on 'Europe/Lisbon'