ruby-changes:50500
From: nagachika <ko1@a...>
Date: Fri, 2 Mar 2018 21:45:59 +0900 (JST)
Subject: [ruby-changes:50500] nagachika:r62634 (ruby_2_4): merge revision(s) 62506, 62508: [Backport #14438]
nagachika 2018-03-02 21:45:41 +0900 (Fri, 02 Mar 2018) New Revision: 62634 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62634 Log: merge revision(s) 62506,62508: [Backport #14438] test_time_tz.rb: past Japanese DST tzdata fix * test/ruby/test_time_tz.rb (TestTimeTZ#test_asia_tokyo): follow the tzdata 2018 fix of Japanese DST transitions (1948-1951). [ruby-core:85373] [Bug #14438] test_time_tz.rb: past Japanese DST tzdata fix * test/ruby/test_time_tz.rb (TestTimeTZ#test_asia_tokyo): fix the expected data at the end of DST. [Bug #14438] Modified directories: branches/ruby_2_4/ Modified files: branches/ruby_2_4/test/ruby/test_time_tz.rb branches/ruby_2_4/version.h Index: ruby_2_4/version.h =================================================================== --- ruby_2_4/version.h (revision 62633) +++ ruby_2_4/version.h (revision 62634) @@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_4/version.h#L1 #define RUBY_VERSION "2.4.4" -#define RUBY_RELEASE_DATE "2018-02-17" -#define RUBY_PATCHLEVEL 240 +#define RUBY_RELEASE_DATE "2018-03-02" +#define RUBY_PATCHLEVEL 241 #define RUBY_RELEASE_YEAR 2018 -#define RUBY_RELEASE_MONTH 2 -#define RUBY_RELEASE_DAY 17 +#define RUBY_RELEASE_MONTH 3 +#define RUBY_RELEASE_DAY 2 #include "ruby/version.h" Index: ruby_2_4/test/ruby/test_time_tz.rb =================================================================== --- ruby_2_4/test/ruby/test_time_tz.rb (revision 62633) +++ ruby_2_4/test/ruby/test_time_tz.rb (revision 62634) @@ -84,6 +84,11 @@ class TestTimeTZ < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_4/test/ruby/test_time_tz.rb#L84 has_right_tz &&= have_tz_offset?("right/America/Los_Angeles") has_lisbon_tz &&= have_tz_offset?("Europe/Lisbon") + CORRECT_TOKYO_DST_1951 = with_tz("Asia/Tokyo") { + if Time.local(1951, 5, 6, 12, 0, 0).dst? # noon, DST + Time.local(1951, 5, 6, 1, 0, 0).dst? # DST with fixed tzdata + end + } def time_to_s(t) t.to_s @@ -126,8 +131,9 @@ class TestTimeTZ < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_4/test/ruby/test_time_tz.rb#L131 def test_asia_tokyo with_tz(tz="Asia/Tokyo") { - assert_time_constructor(tz, "1951-05-06 03:00:00 +1000", :local, [1951,5,6,2,0,0]) - assert_time_constructor(tz, "1951-05-06 03:59:59 +1000", :local, [1951,5,6,2,59,59]) + h = CORRECT_TOKYO_DST_1951 ? 0 : 2 + assert_time_constructor(tz, "1951-05-06 0#{h+1}:00:00 +1000", :local, [1951,5,6,h,0,0]) + assert_time_constructor(tz, "1951-05-06 0#{h+1}:59:59 +1000", :local, [1951,5,6,h,59,59]) assert_time_constructor(tz, "2010-06-10 06:13:28 +0900", :local, [2010,6,10,6,13,28]) } end @@ -329,10 +335,19 @@ America/Managua Wed Jan 1 05:00:00 199 https://github.com/ruby/ruby/blob/trunk/ruby_2_4/test/ruby/test_time_tz.rb#L335 Asia/Singapore Sun Aug 8 16:30:00 1965 UTC = Mon Aug 9 00:00:00 1965 SGT isdst=0 gmtoff=27000 Asia/Singapore Thu Dec 31 16:29:59 1981 UTC = Thu Dec 31 23:59:59 1981 SGT isdst=0 gmtoff=27000 Asia/Singapore Thu Dec 31 16:30:00 1981 UTC = Fri Jan 1 00:30:00 1982 SGT isdst=0 gmtoff=28800 +End + gen_zdump_test CORRECT_TOKYO_DST_1951 ? <<'End' : <<'End' +Asia/Tokyo Sat May 5 14:59:59 1951 UTC = Sat May 5 23:59:59 1951 JST isdst=0 gmtoff=32400 +Asia/Tokyo Sat May 5 15:00:00 1951 UTC = Sun May 6 01:00:00 1951 JDT isdst=1 gmtoff=36000 +Asia/Tokyo Sat Sep 8 13:59:59 1951 UTC = Sat Sep 8 23:59:59 1951 JDT isdst=1 gmtoff=36000 +Asia/Tokyo Sat Sep 8 14:00:00 1951 UTC = Sat Sep 8 23:00:00 1951 JST isdst=0 gmtoff=32400 +End Asia/Tokyo Sat May 5 16:59:59 1951 UTC = Sun May 6 01:59:59 1951 JST isdst=0 gmtoff=32400 Asia/Tokyo Sat May 5 17:00:00 1951 UTC = Sun May 6 03:00:00 1951 JDT isdst=1 gmtoff=36000 Asia/Tokyo Fri Sep 7 15:59:59 1951 UTC = Sat Sep 8 01:59:59 1951 JDT isdst=1 gmtoff=36000 Asia/Tokyo Fri Sep 7 16:00:00 1951 UTC = Sat Sep 8 01:00:00 1951 JST isdst=0 gmtoff=32400 +End + gen_zdump_test <<'End' America/St_Johns Sun Mar 11 03:30:59 2007 UTC = Sun Mar 11 00:00:59 2007 NST isdst=0 gmtoff=-12600 America/St_Johns Sun Mar 11 03:31:00 2007 UTC = Sun Mar 11 01:01:00 2007 NDT isdst=1 gmtoff=-9000 America/St_Johns Sun Nov 4 02:30:59 2007 UTC = Sun Nov 4 00:00:59 2007 NDT isdst=1 gmtoff=-9000 Index: ruby_2_4 =================================================================== --- ruby_2_4 (revision 62633) +++ ruby_2_4 (revision 62634) Property changes on: ruby_2_4 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /trunk:r62506,62508 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/