ruby-changes:51606
From: nagachika <ko1@a...>
Date: Mon, 2 Jul 2018 09:14:59 +0900 (JST)
Subject: [ruby-changes:51606] nagachika:r63817 (ruby_2_5): merge revision(s) 63054, 63055, 63056: [Backport #14655]
nagachika 2018-07-02 09:14:53 +0900 (Mon, 02 Jul 2018) New Revision: 63817 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63817 Log: merge revision(s) 63054,63055,63056: [Backport #14655] test_time_tz.rb: Kiritimati tzdata fix * test/ruby/test_time_tz.rb (TestTimeTZ#test_pacific_kiritimati): fix the expected data at the skip of New Year's Eve 1994. [Bug #14655] test_time_tz.rb: Kiritimati tzdata fix * test/ruby/test_time_tz.rb (gen_zdump_test): fix the expected data at the Kiritimati's skip of New Year's Eve 1994. [Bug #14655] test_time_tz.rb: Lisbon tzdata fix * test/ruby/test_time_tz.rb (gen_variational_zdump_test): Update Lisbon zdump data, which fixed the 1912-01-01 transition for Portugual and its colonies. [Bug #14655] Modified directories: branches/ruby_2_5/ Modified files: branches/ruby_2_5/test/ruby/test_time_tz.rb branches/ruby_2_5/version.h Index: ruby_2_5/version.h =================================================================== --- ruby_2_5/version.h (revision 63816) +++ ruby_2_5/version.h (revision 63817) @@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_5/version.h#L1 #define RUBY_VERSION "2.5.1" -#define RUBY_RELEASE_DATE "2018-03-31" -#define RUBY_PATCHLEVEL 59 +#define RUBY_RELEASE_DATE "2018-07-02" +#define RUBY_PATCHLEVEL 60 #define RUBY_RELEASE_YEAR 2018 -#define RUBY_RELEASE_MONTH 3 -#define RUBY_RELEASE_DAY 31 +#define RUBY_RELEASE_MONTH 7 +#define RUBY_RELEASE_DAY 2 #include "ruby/version.h" Index: ruby_2_5/test/ruby/test_time_tz.rb =================================================================== --- ruby_2_5/test/ruby/test_time_tz.rb (revision 63816) +++ ruby_2_5/test/ruby/test_time_tz.rb (revision 63817) @@ -89,6 +89,9 @@ class TestTimeTZ < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_5/test/ruby/test_time_tz.rb#L89 Time.local(1951, 5, 6, 1, 0, 0).dst? # DST with fixed tzdata end } + CORRECT_KIRITIMATI_SKIP_1994 = with_tz("Pacific/Kiritimati") { + Time.local(1994, 12, 31, 0, 0, 0).year == 1995 + } def time_to_s(t) t.to_s @@ -178,9 +181,17 @@ class TestTimeTZ < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_5/test/ruby/test_time_tz.rb#L181 def test_pacific_kiritimati with_tz(tz="Pacific/Kiritimati") { - assert_time_constructor(tz, "1994-12-31 23:59:59 -1000", :local, [1994,12,31,23,59,59]) - assert_time_constructor(tz, "1995-01-02 00:00:00 +1400", :local, [1995,1,1,0,0,0]) - assert_time_constructor(tz, "1995-01-02 23:59:59 +1400", :local, [1995,1,1,23,59,59]) + assert_time_constructor(tz, "1994-12-30 00:00:00 -1000", :local, [1994,12,30,0,0,0]) + assert_time_constructor(tz, "1994-12-30 23:59:59 -1000", :local, [1994,12,30,23,59,59]) + if CORRECT_KIRITIMATI_SKIP_1994 + assert_time_constructor(tz, "1995-01-01 00:00:00 +1400", :local, [1994,12,31,0,0,0]) + assert_time_constructor(tz, "1995-01-01 23:59:59 +1400", :local, [1994,12,31,23,59,59]) + assert_time_constructor(tz, "1995-01-01 00:00:00 +1400", :local, [1995,1,1,0,0,0]) + else + assert_time_constructor(tz, "1994-12-31 23:59:59 -1000", :local, [1994,12,31,23,59,59]) + assert_time_constructor(tz, "1995-01-02 00:00:00 +1400", :local, [1995,1,1,0,0,0]) + assert_time_constructor(tz, "1995-01-02 23:59:59 +1400", :local, [1995,1,1,23,59,59]) + end assert_time_constructor(tz, "1995-01-02 00:00:00 +1400", :local, [1995,1,2,0,0,0]) } end @@ -364,9 +375,18 @@ Europe/London Sun Aug 10 00:59:59 1947 https://github.com/ruby/ruby/blob/trunk/ruby_2_5/test/ruby/test_time_tz.rb#L375 Europe/London Sun Aug 10 01:00:00 1947 UTC = Sun Aug 10 02:00:00 1947 BST isdst=1 gmtoff=3600 Europe/London Sun Nov 2 01:59:59 1947 UTC = Sun Nov 2 02:59:59 1947 BST isdst=1 gmtoff=3600 Europe/London Sun Nov 2 02:00:00 1947 UTC = Sun Nov 2 02:00:00 1947 GMT isdst=0 gmtoff=0 +End + if CORRECT_KIRITIMATI_SKIP_1994 + gen_zdump_test <<'End' +Pacific/Kiritimati Sat Dec 31 09:59:59 1994 UTC = Fri Dec 30 23:59:59 1994 LINT isdst=0 gmtoff=-36000 +Pacific/Kiritimati Sat Dec 31 10:00:00 1994 UTC = Sun Jan 1 00:00:00 1995 LINT isdst=0 gmtoff=50400 +End + else + gen_zdump_test <<'End' Pacific/Kiritimati Sun Jan 1 09:59:59 1995 UTC = Sat Dec 31 23:59:59 1994 LINT isdst=0 gmtoff=-36000 Pacific/Kiritimati Sun Jan 1 10:00:00 1995 UTC = Mon Jan 2 00:00:00 1995 LINT isdst=0 gmtoff=50400 End + end gen_zdump_test <<'End' if has_right_tz right/America/Los_Angeles Fri Jun 30 23:59:60 1972 UTC = Fri Jun 30 16:59:60 1972 PDT isdst=1 gmtoff=-25200 right/America/Los_Angeles Wed Dec 31 23:59:60 2008 UTC = Wed Dec 31 15:59:60 2008 PST isdst=0 gmtoff=-28800 @@ -414,5 +434,6 @@ End https://github.com/ruby/ruby/blob/trunk/ruby_2_5/test/ruby/test_time_tz.rb#L434 gen_variational_zdump_test "lisbon", <<'End' if has_lisbon_tz Europe/Lisbon Mon Jan 1 00:36:31 1912 UTC = Sun Dec 31 23:59:59 1911 LMT isdst=0 gmtoff=-2192 Europe/Lisbon Mon Jan 1 00:36:44 1912 UT = Sun Dec 31 23:59:59 1911 LMT isdst=0 gmtoff=-2205 +Europe/Lisbon Sun Dec 31 23:59:59 1911 UT = Sun Dec 31 23:23:14 1911 LMT isdst=0 gmtoff=-2205 End end Index: ruby_2_5 =================================================================== --- ruby_2_5 (revision 63816) +++ ruby_2_5 (revision 63817) Property changes on: ruby_2_5 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /trunk:r63054-63056 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/