Blame SOURCES/ruby-spec-Fix-tests-on-tzdata-2022b.patch

9a8c02
From 7e9ec8a20b0f7469b415283d2ec0c22087f8eb2b Mon Sep 17 00:00:00 2001
9a8c02
From: Jun Aruga <jaruga@redhat.com>
9a8c02
Date: Wed, 24 Aug 2022 12:02:56 +0200
9a8c02
Subject: [PATCH] Fix tests with Europe/Amsterdam pre-1970 time on tzdata
9a8c02
 version 2022b.
9a8c02
9a8c02
The Time Zone Database (tzdata) changed the pre-1970 timestamps in some zones
9a8c02
including Europe/Amsterdam on tzdata version 2022b or later.
9a8c02
See <https://github.com/eggert/tz/commit/35fa37fbbb152f5dbed4fd5edfdc968e3584fe12>.
9a8c02
9a8c02
The tzdata RPM package maintainer on Fedora project suggested changing the Ruby
9a8c02
test, because the change is intentional.
9a8c02
See <https://bugzilla.redhat.com/show_bug.cgi?id=2118259#c1>.
9a8c02
9a8c02
We use post-1970 time test data to simplify the test.
9a8c02
---
9a8c02
 core/time/shared/local.rb | 6 +++---
9a8c02
 1 file changed, 3 insertions(+), 3 deletions(-)
9a8c02
9a8c02
diff --git a/spec/ruby/core/time/shared/local.rb b/spec/ruby/core/time/shared/local.rb
9a8c02
index 43f331c4c..c4aa7a7ea 100644
9a8c02
--- a/spec/ruby/core/time/shared/local.rb
9a8c02
+++ b/spec/ruby/core/time/shared/local.rb
9a8c02
@@ -8,10 +8,10 @@ describe :time_local, shared: true do
9a8c02
 
9a8c02
   platform_is_not :windows do
9a8c02
     describe "timezone changes" do
9a8c02
-      it "correctly adjusts the timezone change to 'CEST' on 'Europe/Amsterdam'" do
9a8c02
+      it "correctly adjusts the timezone change to 'CET' on 'Europe/Amsterdam'" do
9a8c02
         with_timezone("Europe/Amsterdam") do
9a8c02
-          Time.send(@method, 1940, 5, 16).to_a.should ==
9a8c02
-            [0, 40, 1, 16, 5, 1940, 4, 137, true, "CEST"]
9a8c02
+          Time.send(@method, 1970, 5, 16).to_a.should ==
9a8c02
+            [0, 0, 0, 16, 5, 1970, 6, 136, false, "CET"]
9a8c02
         end
9a8c02
       end
9a8c02
     end
9a8c02
-- 
9a8c02
2.36.1
9a8c02