Skip to content


Subversion checkout URL

You can clone with
Download ZIP


spec fail spec/ruby/core/time/strftime_spec.rb #1705

leonko opened this Issue · 1 comment

3 participants


I co master and run tests:

Time#strftime returns the timezone with %Z FAILED
Expected "SAMT"
to equal "SAMST"

         { } in Object#__script__ at spec/ruby/core/time/strftime_spec.rb:238
      Kernel(Object)#instance_eval at kernel/common/eval18.rb:45
     { } in Enumerable(Array)#all? at kernel/common/enumerable.rb:102
                        Array#each at kernel/bootstrap/array.rb:68
            Enumerable(Array)#all? at kernel/common/enumerable.rb:102
                        Array#each at kernel/bootstrap/array.rb:68
                 Object#__script__ at spec/ruby/core/time/strftime_spec.rb:4
                       Kernel.load at kernel/common/kernel.rb:580
      Kernel(Object)#instance_eval at kernel/common/eval18.rb:45
                        Array#each at kernel/bootstrap/array.rb:68
  Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:67
  Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:109
           Rubinius::Loader#script at kernel/loader.rb:628
             Rubinius::Loader#main at kernel/loader.rb:832

I live in UTC+5 (Samara region). and SAMT is depricated TZ, now used SAMST (summer time)

I didn't find where this in code (I am a newbie).


I think the issue is that strftime("%Z") first checks that HAVE_TZNAME and HAVE_DAYLIGHT are defined first thus uses tzname whereas Time#zone will check if HAVE_TM_ZONE is defined first and thus use tm->tm_zone.

Does anyone know which is the current preferred define to check first?

See vm/util/time.c:103 and 863.

@jfirebaugh jfirebaugh closed this in 802c7d6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.