Coder Social home page Coder Social logo

Failures with tzdata-2022b about spec HOT 5 CLOSED

voxik avatar voxik commented on July 17, 2024
Failures with tzdata-2022b

from spec.

Comments (5)

junaruga avatar junaruga commented on July 17, 2024 1

I sent the PR: #939.

from spec.

eregon avatar eregon commented on July 17, 2024

Interesting, so Europe/Amsterdam in 1940 is not CEST but "WEST"?
Does the test pass by changing to 1970? PR welcome BTW.

because it seems that 1940 was originally chosen on purpose.

Because of fb2bf67 ?

Changing the expectation to WEST wouldn't work against older tzdata, so using a different year seems more reliable.

from spec.

junaruga avatar junaruga commented on July 17, 2024

I investigated this issue.

Because of fb2bf67 ?

It seems that the commit above added the test cases. But according to the comment for tzdata RPM package issue ticket on Fedora, and checking the tzdata project, here is the caused commit. This is intentional. The change is new in tzdata version "2022b".

eggert/tz@35fa37f

On ruby/ruby, I found the commit to comment out the tests. My guess is that it is a temporary workaround to pass the tests. And the "2022c" is not accurate. It should be "2022b".

The tzdata 2022c removed Amsterdam Mean Time
ruby/ruby@b7577b4

Changing the expectation to WEST wouldn't work against older tzdata, so using a different year seems more reliable.

I would suggest this patch for the ruby/ruby and ruby/spec.

diff --git a/spec/ruby/core/time/shared/local.rb b/spec/ruby/core/time/shared/local.rb
index 997b7186f1..bd33fa01ac 100644
--- a/spec/ruby/core/time/shared/local.rb
+++ b/spec/ruby/core/time/shared/local.rb
@@ -6,18 +6,18 @@
     end
   end
 
-=begin
   platform_is_not :windows do
     describe "timezone changes" do
       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"]
+          [
+            [0, 40, 1, 16, 5, 1940, 4, 137, true, "CEST"],
+            [0, 0, 0, 16, 5, 1940, 4, 137, true, "WEST"]
+          ].should include(Time.send(@method, 1940, 5, 16).to_a)
         end
       end
     end
   end
-=end
 end
 
 describe :time_local_10_arg, shared: true do

from spec.

eregon avatar eregon commented on July 17, 2024

Could you make a PR with that?

Also would it work to change 1940 by 1970? I think that would be simpler.

from spec.

junaruga avatar junaruga commented on July 17, 2024

Sure. I will send the PR with the 1970.

from spec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.