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